begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode; // lizard 8000
	tag = 8000;
	condition = 1;
	text1 = "HISS.";
	text2 = "Hiss.";
	text3 = "Hsssss.";
	text4 = "Bite! Bite! Bite!";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,4));
	break;
	
begintalknode; // cat 8001
	tag = 8001;
	condition = 1;
	text1 = "Meow.";
	text2 = "Meow?";
	text3 = "Hssss.";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,3));
	break;

begintalknode; // sheep 8002
	tag = 8002; 
	condition = 1;
	text1 = "Baaaa.";
	text2 = "Baa.";
	text3 = "BAAA!";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,3));
	break;

begintalknode; // cow 8003
	tag = 8003;
	condition = 1;
	text1 = "Moo.";
	text2 = "Mooooooooooo.";
	text3 = "Moo?";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,3));
	break;

begintalknode; // dog 8004
	tag = 8004;
	condition = 1;
	text1 = "Bark.";
	text2 = "Woof.";
	text3 = "Pant! Pant!";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,3));
	break;

begintalknode; // guard 1 8005
	tag = 8005;
	condition = 1;
	text1 = "Move along.";
	text2 = "I'm watching you.";
	text3 = "Don't do crimes.";
	text4 = "This is a dark time.";
	text5 = "I don't trust you.";
	text6 = "Watch it.";
	text7 = "I'm busy.";
	text8 = "Keep moving.";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,8));
	break;

begintalknode; // guard 1 8006
	tag = 8006;
	condition = 1;
	text1 = "Welcome.";
	text2 = "Be careful.";
	text3 = "I guard the town.";
	text4 = "We're always vigilant.";
	text5 = "We live to serve.";
	text6 = "Watch out for monsters.";
	text7 = "Greetings.";
	text8 = "Safe travels.";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,8));
	break;

begintalknode; // person 8007
	tag = 8007;
	condition = 1;
	text1 = "Hello.";
	text2 = "Goodbye.";
	text3 = "Excuse me.";
	text4 = "I must be going.";
	text5 = "Good day.";
	text6 = "I'm busy.";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,6));
	break;

begintalknode; // anama 8008
	tag = 8008;
	condition = 1;
	text1 = "Hello.";
	text2 = "Resist magic.";
	text3 = "Do you bring the evil of magic?";
	text4 = "We are poor and humble.";
	text5 = "We work hard.";
	text6 = "We will tame this island.";
	text7 = "The Empire fears us.";
	text8 = "Greetings, fellow believer.";
	action = SPEECH_BUBBLE;
	code =
		cs();
		if (has_spec_item(40) > 0)
			as(8);
			else {
				as(get_ran(1,1,7));
				}
	break;

begintalknode; // mad person 8009
	tag = 8009;
	condition = 1;
	text1 = "Go away.";
	text2 = "What are you doing here?";
	text3 = "Trespasser!";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,3));
	break;


// Cheeseball

begintalknode;
	tag = 8060;
	state = -1;
	nextstate = 8029;
	question = "Cheeseball";
	text1 = "You encounter a very large, very pudgy calico cat. You approach it. It looks up at you. The intelligence in its eyes surprises you. _I,_ it proclaims regally, _am Cheeseball. Not the name I would have chosen for myself, I assure you. Do you wish to speak?_";
	text5 = "The cat looks up at you solemnly. _What else? You're probably going to pet me now, aren't you?_";
	action = INTRO;

begintalknode;
	state = 8029;
	nextstate = 8030;
	question = "_How can you talk?_";
	text1 = "_I am, I regret to say, a familiar. Not of my choice._";

begintalknode;
	state = 8029;
	nextstate = 8030;
	question = "_Cheeseball is a rather unusual name._";
	text1 = "_Infinite are the indignities we familiars must suffer._";

begintalknode;
	state = 8030;
	nextstate = 8031;
	question = "_What is a familiar for?_";
	text1 = "It walks up and bats at your bootlaces. _I am the highly magical, immensely intelligent servant of Solberg. And a lousy job it has been._";

begintalknode;
	state = 8030;
	nextstate = -1;
	question = "_What would have been your choice?_";
	text1 = "_I would prefer to have been a wild jungle cat! Romping through the woods, chasing wildebeests, ripping out their jugulars, that's the life for me!_";
	text2 = "It hisses in a way that might almost be thought of as ferocious.";

begintalknode;
	state = 8031;
	nextstate = -1;
	question = "_How did you become intelligent?_";
	text1 = "_Can't you tell? By magic, of course._";

begintalknode;
	state = 8031;
	nextstate = -1;
	question = "_Who is Solberg?_";
	text1 = "_He's a wizard. He's very powerful. Supposedly. Big deal. All the years I've been with him, he hasn't once summoned some fresh mice for me._";
	text2 = "_Since we came to this shoddy fort, Solberg has been working in the gardens to the southeast. I hunt for prey in this cave._";
	code =
		if (which_town() != 21)
			rs(2);
	break;
	
begintalknode;
	state = 8031;
	nextstate = -1;
	question = "_Why has being with Solberg been so lousy?_";
	text1 = "_First, I had to hide with him in some crummy smoky evil tower for years. Then I had to follow him all over the place. No catnip! No mates! No relaxing! How can you not pity me?_ He spits a hairball in irritation.";

begintalknode;
	state = 8029;
	nextstate = -1;
	question = "Pet the cat.";
	text1 = "You pet Cheeseball for a little while. He purrs happily. _It is a very undignified pleasure, I know, but my nature makes its demands._";

// Solberg

begintalknode;
	tag = 8120;
	state = -1;
	nextstate = 8113;
	question = "Solberg";
	text1 = "You meet an aging mage in flowing, violet robes. Although he is only in his forties, he is aged well beyond his years. He gives you a weary bow.";
	text2 = "_Ah, a young adventurer. Another in a long series. I am Solberg, of the Triad._ You have heard of Solberg, this legendary wizard who has fought long for Avernum.";
	text5 = "Solberg says, _You have more to say? I am always happy to provide further assistance to young adventurers._";
	action = INTRO;

begintalknode;
	state = 8113;
	nextstate = -1;
	condition = gf(307,3) >= 1;
	question = "_I have destroyed the plague of slimes. Can you teach me a spell?_";
	code =
		run_hardcode(105);
	break;

begintalknode;
	state = 8113;
	nextstate = -1;
	condition = gf(307,5) >= 1;
	question = "_I have eliminated the giant cockroaches. Can you teach me a spell?_";
	code =
		run_hardcode(180);
	break;

begintalknode;
	state = 8113;
	nextstate = 8114;
	question = "_Tell me more about the Triad?_";
	text1 = "He gives a weary, sad smile. _I serve Avernum in my capacity as a member of the Triad. Alas, I have endured many ordeals in this position._";

begintalknode;
	state = 8114;
	nextstate = 8115;
	question = "_What sorts of ordeals have you lived through?_";
	text1 = "_For many years, I was forced to hide in a tower far out in the nether caves of Avernum for my own protection. The years of my life I lost in that prison I prefer not to think upon._";
	text3 = "_Who can keep track anymore? The latest ordeal was the horror of the Tower of Magi's destruction. I lost many friends. I prefer not to speak of it._";
	code =
		if (which_town() == 24)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 8115;
	nextstate = -1;
	condition = gf(308,5) >= 1;
	question = "_Was the destruction complete?_";
	text1 = "_Nearly. You saw the effects of the destruction as closely as I did. I wish to forget it all._";

begintalknode;
	state = 8114;
	nextstate = 8116;
	question = "_What is the Triad's purpose?_";
	text1 = "_The Triad of Magi oversees all magical activity in Avernum, makes sure dangerous knowledge doesn't become widespread, and watches for any potentially deadly experimentation. Such a position is not without risks._";
	text2 = "_In addition, I am supposed to give magical rewards to those who merit them._";

begintalknode;
	state = 8116;
	nextstate = -1;
	question = "_What sort of dangerous knowledge?_";
	text1 = "_We try to control who can cast arcane and barrier dispelling spells, for example. If unscrupulous persons obtained certain spells, we could all be in great danger._";

begintalknode;
	state = 8116;
	nextstate = 8117;
	question = "_Magical experimentation can be very risky for us all. But we need it to survive._";
	text1 = "_Yes, but we need to keep a close eye on experiments, to make sure nothing deadly gets loose. In particular, I watch my old adversary, Linda._";
	text3 = "_We saw, in the destruction of the Tower, our greatest risk and greatest failure. By losing track of Linda's experimentation, we lost so much, including Mahdavi, one of the Triad itself. I mourn for us all._";
	code =
		if (which_town() == 24)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 8117;
	nextstate = -1;
	question = "_Can you tell me more of Linda?_";
	text1 = "_She has a dangerous predilection for summoning nether creatures. This tendency was what first drove me into hiding for many years. Now that she is back in the Tower, I am very, very nervous._";
	text3 = "He seems to age further before your eyes. _I curse the woman. I am glad for the fate she met. I'm sorry, but I am._";
	code =
		if (which_town() ==24)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 8113;
	nextstate = -1;
	condition = gf(307,3) == 0 && gf(307,5) == 0;
	question = "_Can you give me any magical training?_";
	text1 = "_Not yet. It has been requested that I withhold my most powerful spells as a reward for your achievements on the surface. When you have destroyed one of the magical plagues in southern Valorim, let me know._";

begintalknode;
	state = 8113;
	nextstate = 8118;
	question = "_You have served Avernum for a long time._";
	text1 = "_True. I was one of the first wizards here. I fought in the first war against Grah-Hoth. I helped build the Tower of Magi. I had the honor of assisting the adventurers who destroyed Grah-Hoth once and for all._";
	text2 = "_Then I had the further honor of assisting the adventurers who contacted the vahnatai and helped us win the war against the Empire. I have had a hard life in Avernum, but it was full of achievement._";

begintalknode;
	state = 8118;
	nextstate = -1;
	question = "_What happened to those adventurers?_";
	text1 = "_The first group? Nobody knows. They disappeared. Some think that they eventually found an escape route to the surface, though I have my doubts._";
	text2 = "_The second group? They are in Avernum still, helping repair the damage from the Empire war and working to build relations with the vahnatai._";

begintalknode;
	state = 8113;
	nextstate = -1;
	condition = gf(4,0) == 3;
	question = "_I belong to the Anama. I believe that magic is an evil force that threatens the world._";
	text1 = "_I disagree. Magic is a tool, like any other. A sword can do evil and good. Is a sword evil? You should focus not on the evil in magic, but the evil in our hearts._";
	text3 = "_I ... I don't know. Since the Tower of Magi was destroyed, I have had much time to think. Magic has brought my life little but suffering. I will have to think of this more._";
	action = DEP_ON_SDF 308 5 0;

begintalknode;
	state = 8113;
	nextstate = -1;
	condition = gf(24,14) >= 1 && gf(308,5) == 0;
	question = "_I suspect that Linda is up to something dangerous._";
	text1 = "He shakes his head. _As do I. The Triad continues to dither in the face of this incredible danger. I am furious about it, but there is nothing I can do. Yet._ He thinks. _Be patient. I may yet be able to avert disaster._";

begintalknode;
	state = 8113;
	nextstate = -1;
	condition = which_town() == 21;
	question = "_Is 'X' here too?_";
	text1 = "_Yes. The wizard is doing ... whatever it is 'X' does ... in the guest quarters to the north._";

// 'X'

begintalknode;
	tag = 8140;
	state = -1;
	nextstate = 8141;
	question = "'X'";
	text1 = "You encounter a wizard wearing long, rich violet robes. A heavy cowl covers the mage's head. You can't make out any details of his (or her) face in the shadows inside. It's pretty creepy.";
	text2 = "The old wizard says, in a soft whisper, _I am called 'X'._";
	text5 = "A reedy, whispery voice emerges from the folds of the cowl. _You may speak further._";
	action = INTRO;

begintalknode;
	state = 8141;
	nextstate = 8142;
	question = "_Do you work here?_";
	text1 = "_I am of the Triad._";

begintalknode;
	state = 8142;
	nextstate = 8143;
	question = "_What is the Triad?_";
	text1 = "Again, the whisper emerges from the cowl. _The guardians of knowledge, and the protectors of Avernum._";

begintalknode;
	state = 8143;
	nextstate = 8144;
	question = "_How do you guard knowledge?_";
	text1 = "_We restrict the flow of magical knowledge, so that the weak and untrained do not grasp hold of that they cannot control._";
	text3 = "_We keep the weak from knowledge that would damage them. A wise choice, considering the recent unpleasantness at the Tower of Magi._";
	code =
		if (which_town() == 24)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 8144;
	nextstate = -1;
	question = "_We are all weak when we start out in life._";
	text1 = "_Most of us are. If one gains magic he or she cannot control, only blood will be produced._ X emits a dry chuckle at this.";

begintalknode;
	state = 8144;
	nextstate = -1;
	condition = gf(308,5) >= 1;
	question = "_I'd call what happened to the Tower of Magi more then just unpleasant._";
	text1 = "_Linda was a fool, and we paid for it. Never again. The answer is more control of magic, more limits. Not less._";

begintalknode;
	state = 8143;
	nextstate = 8141;
	question = "_How do you protect Avernum?_";
	text1 = "_We watch over the magical knowledge, and grant it to those that have earned it._";

begintalknode;
	state = 8141;
	nextstate = -1;
	condition = gf(307,8) >= 1;
	question = "_I have defeated the troglodytes and giants. Have I earned the right to learn more magic?_";
	code =
		run_hardcode(106);
	break;

begintalknode;
	state = 8141;
	nextstate = -1;
	condition = gf(308,0) >= 1;
	question = "_I have defeated the golems. Have I earned the right to learn more magic?_";
	code =
		run_hardcode(181);
	break;

begintalknode;
	state = 8141;
	nextstate = -1;
	condition = gf(307,8) == 0 && gf(308,0) == 0;
	question = "_Would you teach me some more magic?_";
	text1 = "_I only give great power to those who have done great deeds. Eradicate some of the more powerful creatures in northern Valorim, and I will assist you._";
	text2 = "_If you have done anything of use in southern Valorim, talk to Solberg. He is responsible for rewards in that area._";

begintalknode;
	state = 8141;
	nextstate = 8145;
	question = "_What sort of research do you do?_";
	text1 = "_Of late, I have been creating items. Powerful magical items._";

begintalknode;
	state = 8145;
	nextstate = 8146;
	question = "_Really? What sort of items?_";
	text1 = "_I made items to assist the first group of spies to infiltrate the surface. Unique magical items, the like of which has never been seen before. The Xian items._";

begintalknode;
	state = 8146;
	nextstate = -1;
	question = "_Do you have any items like that for us?_";
	text1 = "He chuckles. _For you? For the secondaries? I think not. If you want my Xian items, explore the surface. They are all still up there somewhere, lost by the first group. As for me, my researches have since traveled elsewhere._";

begintalknode;
	state = 8141;
	nextstate = -1;
	condition = gf(4,0) == 3;
	question = "_I belong to the Anama. I believe that magic is an evil force that threatens the world._";
	text1 = "_I'm sure you believe a lot of other stupid things too._";

begintalknode;
	state = 8141;
	nextstate = -1;
	condition = gf(24,14) >= 1 && gf(308,5) == 0;
	question = "_We suspect that Linda may be up to something dangerous._";
	text1 = "_Nonsense. She is a powerful wizard, and she has learned from her mistakes. I have no doubt that she is doing what she does for the best ... the best ... what was I saying?_";

begintalknode;
	state = 8141;
	nextstate = -1;
	condition = which_town() == 21;
	question = "_Is Solberg here too?_";
	text1 = "_Yes. Admiring samples from the surface. In the workshop to the south._";
	
// Flanagan

begintalknode;
	tag = 8240;
	state = -1;
	nextstate = 8201;
	question = "Flanagan";
	text1 = "You meet a burly man with a lot of hair and a lot of gut. He looks you up and down as you approach. _I'm Flanagan, with Unspecified Services. Pleased to meet you._";
	text5 = "Flanagan is hoping for further distraction from his work. You trade stories about your Unspecified Services work with him for a while.";
	action = INTRO;

begintalknode;
	state = 8201;
	nextstate = -1;
	question = "_Tell me about Unspecified Services?_";
	text1 = "_You know, everyone who works for the Avernum government but doesn't have a specific pigeonhole. Unspecified tasks. Mainly spies and adventurers._";

begintalknode;
	state = 8201;
	nextstate = 8202;
	question = "_What is your job with Unspecified Services?_";
	text1 = "_Well, I'm sort of an investigating agent. When problems happen, I make them not be problems anymore. I work mainly in Upper Avernum. Work on the surface is left to others, like you._";

begintalknode;
	state = 8202;
	nextstate = 8203;
	question = "_What sort of investigating do you do?_";
	text1 = "_Well, I'm too big and loud to be much of a spy! So I wait here. Then, when something goes wrong or gets weird, I'll go look it over and figure out what's going wrong._ He taps his head. _I got more up here than you might think._";
	text3 = "_Well, right now I'm investigating a pair of messy murders. I'm glad you're here. I could use some help._";
	action = DEP_ON_SDF 308 4 0;

begintalknode;
	state = 8203;
	nextstate = 8204;
	condition = gf(308,4) >= 1;
	question = "_Sounds bad. What information have you dug up so far?_";
	text1 = "_Not long ago, two men here went north to do some surveying. Not long after that, there was an earthquake. Not long after that, they were found in a cave up there, dead. I sure could use another brain to find out what happened._";
	text3 = "_I heard about the evidence you found. I don't think we'll find out much else about those earlier murders, but I'm waiting here, just in case something else happens._";
	action = DEP_ON_SDF 308 4 3;

begintalknode;
	state = 8201;
	nextstate = 8204;
	condition = gf(308,4) >= 1 && gf(308,4) <= 3;
	question = "_What are you investigating up here?_";
	text1 = "_Two New Formellans, Thompson and Foley, recently went north to a small cave to look for minerals. Days later, there was a quake. Then the bodies were found. Their bodies are there still. Nobody wants to go and get them._";
	text2 = "_I am investigating here to see what happened, but, so far, I have had no luck. I was hoping that you would go north and see what you can find in the cave there._";
	action = SET_SDF 43 11 1;

begintalknode;
	state = 8201;
	nextstate = -1;
	condition = gf(308,4) == 3 && has_spec_item(10) <= 0;
	question = "_I have explored the cave to the north, but I haven't found any evidence._";
	text1 = "_Keep exploring. Something is up there, I'm sure of it. Nothing like that happens without some trace of it._";

begintalknode;
	state = 8201;
	nextstate = -1;
	condition = gf(308,4) >= 3 && has_spec_item(10) > 0;
	question = "_I found this in the murder cave._ (Show Flanagan the key.)";
	text1 = "Flanagan examines it closely. _Very interesting. Very unusual. Be sure to show it to Anaximander as soon as possible. This may eventually lead to our finding who killed Foley and Thompson._";

begintalknode;
	state = 8204;
	nextstate = -1;
	question = "_What have you learned up here?_";
	text1 = "_Well, there is a lot of stress between the humans and the sliths, though I don't think that it has anything to do with the murders. But I've been wrong before._";
	text2 = "_I think the best lead is the cavern to the north that Foley and Thompson were exploring. But I don't have the experience to explore something like that. It would take adventurers. Like you._";

begintalknode;
	state = 8201;
	nextstate = -1;
	condition = gf(308,4) >= 4;
	question = "_What are you doing here now that I've explored the murder cave?_";
	text1 = "_Well, I don't have much hope of finding the murderer here, but I am staying on to try to smooth out relationships between the sliths and the humans. It's a difficult situation, which could use some mediation._";

begintalknode;
	state = 8203;
	nextstate = -1;
	condition = gf(308,4) == 1;
	question = "_How can I help?_";
	text1 = "_Go up north and investigate. Find what you can of who killed them, and, if you can, find the killers. I'll wait here. Report to me when you find something. You may also wish to tell Anaximander that you have agreed to help me._";
	action = SET_SDF 43 11 1;

// Brantford

begintalknode;
	tag = 8220;
	state = -1;
	nextstate = 8253;
	question = "Brantford";
	text1 = "This mage looks more like a salesman than anything else. A leather satchel is slung over his shoulder. It bulges with all manner of odd-shaped things. As you approach, he displays a predatory smile. _I am Brantford, mage and salesman. Collector as well._";
	text5 = "Brantford still looks eager to sell you something. His hand rests lightly on his bulging sack of goods. _How can I please you, my fine adventurer?_";
	action = INTRO;

begintalknode;
	state = 8253;
	nextstate = 8254;
	question = "_What is it you collect?_";
	text1 = "_I collect valuable items of all sorts._";

begintalknode;
	state = 8254;
	nextstate = 8255;
	question = "_Where do you get your items?_";
	text1 = "_Many interesting souls come through the Tower of Magi, and I collect goods from them for resale. Perhaps you would like to purchase some of my goods? Or sell me some trinkets you no longer have need of?_ ";
	text3 = "He sighs. _Alas, the loss of the Tower of Magi as a place of business cost me valuable location and inventory. However, you can still purchase my wares and sell me excess supplies._";
	action = DEP_ON_SDF 308 5 0;

begintalknode;
	state = 8255;
	nextstate = 8256;
	question = "_Maybe later. What do you think about the Tower of Magi?_";
	text1 = "_A wondrous place. Pity about the weirdness._";
	text3 = "_Sad business, that. But one must soldier on, eh?_";
	action = DEP_ON_SDF 308 5 0;

begintalknode;
	state = 8256;
	nextstate = -1;
	condition = gf(308,5) == 0;
	question = "_Weirdness?_";
	text1 = "_Oh, one hears rumors of odd goings on. Although I have accumulated some magical skill over the years, I don't concern myself with such things. I am a businessman._";

begintalknode;
	state = 8253;
	nextstate = -1;
	question = "_I would like to look at your wares._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Brantford's Goods","Although his bag looks small, Brantford pulls quite a few items out of it. It must be enchanted somehow. If you don't like what he has, he assures you that his stock changes from time to time.",5,3,3);
	break;

begintalknode;
	state = 8253;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 8253;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_All right. Thank you. Come again!_";
	action = END_TALK;	
	
// Clarisse

begintalknode;
	tag = 8280;
	state = -1;
	nextstate = 8297;
	question = "Clarisse";
	text1 = "This woman is old and tired, worn down by decades of service in the underworld. Yet, her robes are an immaculate white, even paler than her face, and her face radiates peace and strength.";
	text2 = "_Welcome, child. I am Mother Clarisse. This is a place of peace and learning._";
	text5 = "Mother Clarisse smiles calmly, creating an island of tranquility in this strange place through pure force of will. _How else can I bring you peace before you return to your trials?_";
	action = INTRO;

begintalknode;
	state = 8297;
	nextstate = 8298;
	question = "_Are you in charge of this temple?_";
	text1 = "_I am a high priestess of the Church of the Seeking Soul. I spend my time learning, and teaching. And, when it cannot be avoided, wandering._";

begintalknode;
	state = 8298;
	nextstate = -1;
	question = "_What is it like to be the high priestess at the Tower?_";
	text1 = "_It is the greatest honor ever afforded to me._";
	text3 = "She looks sad. _It was the greatest honor ever afforded to me. Alas, it did nothing to save the Tower of Magi. I did nothing._";
	code =
		if (which_town() ==24)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 8298;
	nextstate = -1;
	question = "_What are the teachings of this church?_";
	text1 = "_We are dedicated to the liberation of learning. Why do we not suffer the tyranny of the strong? Why do we not live exclusively in hovels, prey to giant lizards and disease? Because of learning._";
	text2 = "_We of this church accumulate and further knowledge in all forms. Knowledge is not wisdom, but it does lead to it._";

begintalknode;
	state = 8298;
	nextstate = -1;
	question = "_Learning what?_";
	text1 = "_Everything. My main responsibility in the Church of the Seeking Soul is to never stop learning, and never stop exploring. It is a great burden. Sometimes, I wish to stop and say enough is enough._";
	text2 = "_Fortunately, the joy of teaching keeps me going._";

begintalknode;
	state = 8298;
	nextstate = -1;
	question = "_Will you teach anyone?_";
	text1 = "_Others hoard their magical skills. We delight in sharing them. Alas, we must request a fee to support our archival efforts. Are you interested in spells? I can provide them._";

begintalknode;
	state = 8298;
	nextstate = -1;
	question = "_I take it that you don't care for wandering?_";
	text1 = "_Before I came here, I did service in the Empire War, healing, and even fighting. It provided an education, but one I would have been happier without._";
	text3 = "She shakes her head angrily. _I was visiting here when Linda visited doom on my home, making me a wanderer again. The Tower of Magi is gone, and I mourn the souls lost. I mourn the many worthy and learned souls lost, and I pity our country._";
	code =
		if (which_town() == 24)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 8297;
	nextstate = -1;
	question = "_What can you teach me?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Mother Clarisse","Mother Clarisse is a priestess of considerable power. Even better, she is willing to share what she knows. Best of all, she's a good teacher.",17,2,3);
	break;

begintalknode;
	state = 8297;
	nextstate = 8299;
	question = "_Do you heal visitors to your shrine?_";
	text1 = "_Yes, I can. Are any difficulties ailing you?_";

begintalknode;
	state = 8299;
	nextstate = -1;
	condition = has_spec_item(65) || has_spec_item(66);
	question = "_I am afflicted by a curse. Can you help me?_";
	text1 = "_I could, but I won't. Removing such curses are incredibly draining, and I need to maintain all of my powers. I do have advice for you. From what I have heard of the surface, there is a sect up there called the Anama._";
	text2 = "_They are the most powerful priests you will have access to. If anyone can help you, they can._";

begintalknode;
	state = 8299;
	nextstate = 8297;
	question = "_I am feeling fine. Thank you._";
	text1 = "_I am glad to hear it._";

begintalknode;
	state = 8297;
	nextstate = -1;
	condition = 1;
	question = "_I must be going._";
	text1 = "She is sad to hear it. _You are always welcome to return._";
	action = END_TALK;

// Weaponsmith

begintalknode;
	tag = 8340;
	state = -1;
	nextstate = 8301;
	question = "Weaponsmith";
	text1 = "The town weaponsmith bows to you, politely waiting to take your order. Instruments of war are everywhere. _Is there any way I can help you, friend?_";
	action = INTRO;


begintalknode;
	state = 8301;
	nextstate = -1;
	question = "_I'd love to buy some weaponry._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Fine Weaponry","You browse the selection of weaponry, looking for something which will aid you in your adventures.",gf(297,0),gf(297,1),0);
	break;
	
begintalknode;
	state = 8301;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 8301;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_All right. Thank you. Come again!_";
	action = END_TALK;

// Armorsmith

begintalknode;
	tag = 8360;
	state = -1;
	nextstate = 8329;
	question = "Armorsmith";
	text1 = "This shop is crammed with metalworking tools and dented helmets and breastplates. You are greeted by a grinning and helpful armor salesman. _I am at your service. How may I help you be safer?_";
	action = INTRO;

begintalknode;
	state = 8329;
	nextstate = -1;
	question = "_Let me purchase some of your wares._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Buying Armor","This shop has an assortment of well-made armor and other protective gear.",gf(297,0),gf(297,1),3);
	break;
	
begintalknode;
	state = 8329;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 8329;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything else._";
	text1 = "_Well then, if you don't survive, it's not my fault. Good luck!_";
	action = END_TALK;

// Merry

begintalknode;
	tag = 8380;
	state = -1;
	nextstate = 8357;
	question = "Merry";
	text1 = "The tinker looks up from a rather intricate repair job. You can't help but feel that his face looks familiar somehow. _I am known as Merry. Welcome to my shop._";
	text5 = "Merry watches you expectantly, trying to detect willingness to buy something.";

begintalknode;
	state = 8357;
	nextstate = 8358;
	question = "_What sort of shop is this?_";
	text1 = "_My siblings and I run shops such as this all over Valorim. I have a host of fine tools you can purchase. Also, I deal in used goods. Any supplies you no longer want, you can sell to me._";

begintalknode;
	state = 8357;
	nextstate = -1;
	question = "_Let's trade._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Merry's Supplies","Like many shops all over Valorim, this store sells useful tools and other supplies.",gf(297,0),gf(297,1),0);
	break;

begintalknode;
	state = 8358;
	nextstate = 8359;
	question = "_Have you many siblings?_";
	text1 = "_Yes! My parents were well-blessed with children, and they taught us well the toolsmithing trade. We have since left home and spread all over Valorim, opening shops and plying our trade._";
	text2 = "_You may have visited one of my brother's or sister's shops. You would be able to tell because of our unfortunate naming situation._";

begintalknode;
	state = 8359;
	nextstate = -1;
	question = "_Unfortunate? How so?_";
	text1 = "_My parents were somewhat uncreative, so they gave us all the same name. Kind people, our parents. Talented with their hands. But perhaps not at the optimal level of intelligence._";

begintalknode;
	state = 8359;
	nextstate = 8357;
	question = "_How many kids did your parents have?_";
	text1 = "_Not sure, I left home before they were finished. They brought many of us into the world and taught us well. However, when it came to naming us, it was an unfortunate situation._";
	
begintalknode;
	state = 8357;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 8357;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything else._";
	text1 = "_Then safe travels. If you meet any of my brothers, say hello!_";
	action = END_TALK;
	
// Provisioner

begintalknode;
	tag = 8400;
	state = -1;
	nextstate = 8385;
	question = "Provisioner";
	text1 = "A heavy-set man with a dark complexion is working hard rolling out pie crusts. His hands and clothes are coated with flour. He barely looks up from his work. _I am the local provisioner, and you look like a traveler. Welcome to my shop._";

begintalknode;
	state = 8385;
	nextstate = 8386;
	question = "_Is any of this for sale?_";
	text1 = "_Why yes! You look to be an adventurer. I have all sort of rations for sale. I only sell quality goods. They'll hold up well while you travel._";

begintalknode;
	state = 8385;
	nextstate = -1;
	question = "_Can I purchase some of your rations?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Provisioner","The food sold here is not cuisine by any measure, but it's healthy, hearty fare, good for sustenance during a long journey.",gf(297,0),gf(297,1),0);
	break;

begintalknode;
	state = 8386;
	nextstate = -1;
	question = "_Quality food, you say?_";
	text1 = "_It needs to be! It's what I eat when I travel._";

begintalknode;
	state = 8386;
	nextstate = 8387;
	question = "_How did you know that I am an adventurer?_";
	text1 = "_You learn to be able to tell in this trade._ He grunts and slaps some recalcitrant dough flat with the palm of his hand. _Oh, I'd love to go gallivanting on quests and stuff, looting and slaying. But I travel enough as it is._";

begintalknode;
	state = 8387;
	nextstate = -1;
	question = "_Why don't you go out and do quests?_";
	text1 = "_Well, that's what you adventurers do, isn't it? Break into creatures' homes, slay them, and take their stuff, isn't it? Damned impolite, if you ask me._";
	text2 = "He tastes the dough. It seems to meet with his approval.";

begintalknode;
	state = 8387;
	nextstate = -1;
	question = "_Where do you usually travel?_";
	text1 = "_Everywhere! I run shops like this all over Valorim. Others take care of them, usually, but I have to go all around anyway to make sure they're all in shape._";
	text2 = "_In fact, we may meet again at a different shop!_";	
begintalknode;
	state = 8385;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 8385;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything else._";
	text1 = "_All right. Best of luck on the road!_";
	action = END_TALK;


// Tailor

begintalknode;
	tag = 8420;
	state = -1;
	nextstate = 8413;
	question = "Tailor";
	text1 = "The town tailor sits at a wide table, pins in her mouth, hemming a long dress. She says something, but the pins in her mouth keep you from understanding.";

begintalknode;
	state = 8413;
	nextstate = 8414;
	question = "_What sort of shop is this?_";
	text1 = "She starts saying something about what she does and what she has for sale, but the pins in her mouth make her very hard to understand. You do make out the word _sale._";

begintalknode;
	state = 8413;
	nextstate = -1;
	question = "_Can I buy some of your items?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Town Tailor","What she lacks in comprehensibility, the town tailor makes up for in skill. All of her garments are very well-made and reasonably priced.",gf(297,0),gf(297,1),0);
	break;

begintalknode;
	state = 8414;
	nextstate = 8415;
	question = "_I can't understand what you're saying with the pins in your mouth._";
	text1 = "She says something in response, but again, the pins keep you from understanding. It sounds like _Wrrrss tmmmm prrrmmbblmmm?_";

begintalknode;
	state = 8415;
	nextstate = 8416;
	question = "_Excuse me?_";
	text1 = "She nods and smiles. _Tmmmm hooorrrkllaaa._ Satisfied, she gets back to work.";

begintalknode;
	state = 8416;
	nextstate = 8413;
	question = "_What was that?_";
	text1 = "She looks irritated. _Wrrrr hoooo prrrmmmsm?_ You wonder how she talks so emphatically with the pins in her mouth without poking her lips.";

begintalknode;
	state = 8413;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 8413;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything else._";
	text1 = "_Hmmmrph! Mrrrph!_";
	action = END_TALK;

// Fletcher

begintalknode;
	tag = 8440;
	state = -1;
	nextstate = 8441;
	question = "Fletcher";
	text1 = "You meet the town fletcher, who sits at a counter covered with feathers, thin wood shafts, broken arrows, and other items of the trade. _Ah! A customer! Please come in. My goods are ready for sale._";

begintalknode;
	state = 8441;
	nextstate = -1;
	question = "_What do you have here?_";
	text1 = "_Missile weapons for sale. It's my life's work! The perfect thing for bringing down a monster at a safe distance._";

begintalknode;
	state = 8441;
	nextstate = -1;
	question = "_Let me buy some of your missiles._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Town Fletcher","The missiles here look well-made and entirely effective.",gf(297,0),gf(297,1),3);
	break;

begintalknode;
	state = 8441;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 8441;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything else._";
	text1 = "_Understood. Thanks for stopping by!_";
	action = END_TALK;
	
// innkeeper

begintalknode;
	tag = 8500;
	state = -1;
	nextstate = 8565;
	question = "innkeeper";
	text1 = "The innkeeper works busily behind the bar. _Welcome, travelers. I'm the barkeep. Just call me Barkeep. Everyone else does._";

begintalknode;
	state = 8565;
	nextstate = 8566;
	question = "_What are you serving?_";
	text1 = "_Don't have much here, out in the middle of nowhere. You can get a drink. Good ale, only three coins. Or, you can have a room. Only ten coins. And no vermin._";
	text2 = "_Not much, but it's the best you'll do out here in the provinces._";
	
begintalknode;
	state = 8566;
	nextstate = 8565;
	question = "_This place is isolated._";
	text1 = "_Sad but true. I got beer and rooms for those few travelers who come through. That's my life._";

begintalknode;
	state = 8565;
	nextstate = -1;
	condition = coins_amount() >= 3;
	question = "_I'll take some ale._ Pay three coins.";
	text1 = "You pay your gold, and get a round of very, very average ale. It gets the job done.";
	code =
		change_coins(-3);
		force_char_status(30000,1,20);
	break;

begintalknode;
	state = 8565;
	nextstate = -1;
	condition = coins_amount() >= 10;
	question = "_I need a room._ Pay ten coins.";
	text1 = "You pay the coins and go off to rest. The room isn't luxurious, but it is warm and pest free. You sleep well.";
	action = END_TALK;	
	code =
		revive_party();
		change_coins(-10);
		relocate_char(get_pc_id(0),gf(297,0),gf(297,1),FALSE);
		relocate_char(get_pc_id(1),gf(297,0) + 1,gf(297,1),FALSE);
		relocate_char(get_pc_id(2),gf(297,0) + 1,gf(297,1) + 1,FALSE);
		relocate_char(get_pc_id(3),gf(297,0),gf(297,1) + 1,FALSE);
	break;

begintalknode;
	state = 8565;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything else._";
	text1 = "_Farewell, then._";
	action = END_TALK;
	

// Vlad

begintalknode;
	tag = 8640;
	state = -1;
	nextstate = 8641;
	question = "Vlad";
	text1 = "You meet a slightly deranged little man. His rough, dirty clothes and thick boots speak of many months on the road, and he's bent over under the weight of a heavy sack. _I'm Vlad the Light Salesman! How are ya'?_";
	text5 = "Vlad grins. _Hope you're well. I am. I'm still selling my goods, too._";
	action = INTRO;

begintalknode;
	state = 8641;
	nextstate = 8642;
	question = "_What is your occupation?_";
	text1 = "_I'm a light salesman! Takes me places, let me tell ya'!_";

begintalknode;
	state = 8642;
	nextstate = -1;
	question = "_A light salesman?_";
	text1 = "_You heard right, adventuring friend! You can't hold a torch to my torches! Don't crawl into a slimy, filthy, death pit without one!_";

begintalknode;
	state = 8642;
	nextstate = 8643;
	question = "_Oh really? What places has it taken you?_";
	text1 = "_Oh yeah, seems like I'm always goin' somewhere. I was up in Gale the other week! What a mess!_";

begintalknode;
	state = 8641;
	nextstate = -1;
	question = "_Let me see your wares._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Vlad's Lights","Vlad carries his light sources all over Valorim. It's not the most pleasant vocation, but it's his, and he's very attached to it.",28,3,3);
	break;

begintalknode;
	state = 8643;
	nextstate = 8644;
	question = "_What's wrong in Gale?_";
	text1 = "_Gale's a city way up the northeast. You aren't gonna' believe this, but they're being attacked by hordes of monsters!_";

begintalknode;
	state = 8644;
	nextstate = 8641;
	question = "_So these problems extend far north?_";
	text1 = "_You heard me. Hard to believe, I know, but whaddaya' gonna' do? Now, you wanna' buy a torch?_";

begintalknode;
	state = 8641;
	nextstate = -1;
	condition = 1;
	question = "_I don't need any lights._";
	text1 = "_But you will! You will! I'm sure we'll meet again. I get around!_";
	action = END_TALK;

// Gypsy

begintalknode;
	tag = 8760;
	state = -1;
	nextstate = 8729;
	question = "Gypsy";
	text1 = "A heavy-set woman stands in the middle of the tavern, commanding everyone's attention. She plays her harp flawlessly. You sit and listen, a rare moment of peace in your dangerous journey.";
	text2 = "When she finishes her song, she walks up to speak with you. Her skin is incredibly pale. She's an Avernite! She bows. _I'm Gypsy._";
	text5 = "Gypsy the Avernite smiles at you. _Always nice to see familiar faces on the surface. I have a few moments to talk before my next set._";
	action = INTRO;

begintalknode;
	state = 8729;
	nextstate = 8730;
	question = "_What are you doing up on the surface?_";
	text1 = "She tunes her harp as she speaks. _Oh, just touring. Like you, I suppose._";

begintalknode;
	state = 8730;
	nextstate = 8731;
	question = "_How did you get here?_";
	text1 = "_Well, I've already played pretty much everywhere in Avernum, so I snuck up here. Tricky, but I did it. I was in the first crew that worked on Fort Emergence. Once I got there, it was easy to slip out onto the surface._";
	text3 = "She sighs. _Well, I was having a wonderful time playing in Krizsan. But then the slime situation got too intense, so I came here. It's something of an improvement._";
	code =
		if (day_reached(25,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 8730;
	nextstate = 8732;
	question = "_Why did you leave Avernum?_";
	text1 = "_Oh, but I was tired of that place! Too damp. Couldn't keep my instrument in tune. Not so bad up here ... there's lots of monsters, slimes and such, but we're all used to that._";
	text2 = "She strums out a short tune on her instrument. It's lovely.";

begintalknode;
	state = 8731;
	nextstate = -1;
	question = "_How did you manage to sneak out?_";
	text1 = "_It wasn't difficult. Lots of workers, few guards. And I'm not the only one!_";
	text2 = "_Pretty immoral of me, I know. It's dangerous if the Empire finds out the Avernites are escaping. Happily, in Valorim, nobody seems to care. They're wild folk out here._";

begintalknode;
	state = 8732;
	nextstate = -1;
	question = "_Know anything about these monsters?_";
	text1 = "_The monsters are bad for the people up here, but it's no worse than what we're used to. Just be careful and you should be fine._";
	text3 = "She shakes her head. _Lots of monsters everywhere, and it's getting worse all the time. I'm going to have to keep touring soon, just to find someplace safe._";
	code =
		if (day_reached(15,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 8729;
	nextstate = 8733;
	question = "_You're not supposed to be up here! We are supposed to be the first surface explorers!_";
	text1 = "She chuckles. _Life is full of surprises, isn't it? And you're far from the first._";

begintalknode;
	state = 8733;
	nextstate = -1;
	question = "_Really? Who else is up here?_";
	text1 = "_Other people who snuck up with me. Spies from other branches of the Avernite army. Chitrachs who slipped through the net. Sorry to disappoint you._ She smiles and works on tuning her instrument.";

begintalknode;
	state = 8729;
	nextstate = -1;
	condition = coins_amount() >= 5;
	question = "_Play something for me?_ (Give her 5 coins.)";
	text1 = "She gladly takes your coins. _Thank you. Food is expensive up here._ She plays a long, complex melody. You nod your thanks and move on.";
	action = END_TALK;
	code =
		change_coins(-5);
	break;
	
begintalknode;
	state = 8729;
	nextstate = -1;
	question = "_I'll be moving on._";
	text1 = "_Me too, soon enough. So many lands I want to see. Maybe I'll see you again._ She returns to the stage.";
	action = END_TALK;
	
	
// Gardner

begintalknode;
	tag = 8880;
	state = -1;
	nextstate = 8829;
	question = "Gardner";
	text1 = "This priest is wandering the streets of the city. He wears rough, woolen clothes, which look like they've been worn through muddy swamps from one end of the continent to the other. Only a small wooden ankh marks him as a holy man. _I am Gardner._";
	text5 = "Gardner extends a calloused hand and puts it on your shoulder. _It is good to be here, and good that we talk. How else can I help you?_";
	action = INTRO;

begintalknode;
	state = 8829;
	nextstate = 8830;
	question = "_You look like you have been through a lot._";
	text1 = "He fingers his ankh. _I've been wandering the lands, trying to help people deal with the monsters that plague us._";

begintalknode;
	state = 8830;
	nextstate = 8831;
	question = "_Where have you wandered?_";
	text1 = "_I was up near Sharimik and Lorelei recently, until I heard this province was getting very little help from the Empire. I came here. I've walked many miles._";
	text3 = "_I was up near Sharimik and Lorelei for a while, and then went down to Colchis. Then it was destroyed by slimes, so I came here. I hope I don't have to hit the road yet again, but it's always possible._";
	code =
		if (which_town() ==124)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 8830;
	nextstate = 8832;
	question = "_What do you know of the monster plague?_";
	text1 = "_In my wanderings, I have heard that the slimes attacking Krizsan are actually rather benign. Some cities have been attacked by giants, others by troglodytes. I have heard rumors of golems and bizarre furred beasts._";
	text2 = "_Most unnerving of all, Shayder has encountered a truly bizarre horror._";

begintalknode;
	state = 8830;
	nextstate = -1;
	question = "_How do you help people?_";
	text1 = "_I am mainly a healer. I do what I can in return for a small fee to keep me on the road. Perhaps you need my services?_";

begintalknode;
	state = 8831;
	nextstate = -1;
	question = "_Where are Sharimik and Lorelei?_";
	text1 = "_These two major cities are in the middle of the continent of Valorim. They have been attacked by wave upon wave of humanoids. Giants and troglodytes. 'Tis a deadly area to visit._";

begintalknode;
	state = 8832;
	nextstate = -1;
	question = "_What happened to Shayder?_";
	text1 = "_Shayder has been attacked by waves of gigantic cockroaches._ He shudders. _Filthy beasts. It's hard to believe, but I have seen them._";
	text3 = "_Shayder has been attacked by waves of gigantic cockroaches._ He shudders. _Filthy beasts. It's hard to believe, but I have seen them. I have heard rumors that the roach lair has been destroyed. I fervently hope that they are true._";
	action = DEP_ON_SDF 307 5 0;

begintalknode;
	state = 8829;
	nextstate = -1;
	question = "_I could use the services of a healer._";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Gardner",
		  "Gardner is a traveling healer, practicing his craft all over the wartorn lands of Valorim.",
		  27,4,0);	
	break;

begintalknode;
	state = 8829;
	nextstate = -1;
	question = "_Can you train me in the paths of holiness?_";
	text1 = "_No, I am afraid not. I am a worker, not a teacher. You should go to Shayder, on the Isle of Bigail. Much magical and holy instruction can be found there._";

begintalknode;
	state = 8829;
	nextstate = -1;
	condition = 1;
	question = "_I don't need any help._";
	text1 = "_I am very happy to hear it. A rare thing to hear in these troubled times_";
	action = END_TALK;


// Strange Wizard

begintalknode;
	tag = 8940;
	state = -1;
	nextstate = 8901;
	question = "Strange Wizard";
	text1 = "A wizard in dark robes sits cross-legged in front of you. He looks intently at you from under bushy eyebrows. He clearly could not be less impressed. You ask his name. He responds, _Names have power, child._";
	text5 = "The strange wizard stares at you without blinking. He is very old and completely unafraid.";
	action = INTRO;

begintalknode;
	state = 8901;
	nextstate = 8902;
	question = "_Why are you sitting here?_";
	text1 = "He shakes his head in amusement. _I am merely observing. In this age of fury and blades, knowledge is a true weapon._";

begintalknode;
	state = 8902;
	nextstate = -1;
	question = "_Why did you call this an age of fury and blades?_";
	text1 = "_Avernum attacks the Empire. Empire attacks Avernum. This struggle is no longer relevant. Krizsan fights the slimes. This struggle is not relevant. Our true enemy has yet to be found._";

begintalknode;
	state = 8902;
	nextstate = -1;
	question = "_What have you observed?_";
	text1 = "_I am simply watching carefully what happens. Who is doing what, and what is coming from where. Others can kill the monsters, and they have their purpose._";
	text2 = "_However, those who wish to solve the true problems that face us must watch and search and learn. Our true enemy has yet to be found._";

begintalknode;
	state = 8902;
	nextstate = 8903;
	question = "_How can knowledge be used as a weapon?_";
	text1 = "_We all have much to learn, and about more than just monsters. For example, I believe Valorim contains certain valuable magical artifacts._";
	
begintalknode;
	state = 8903;
	nextstate = 8904;
	question = "_Can you tell me about the magical artifacts you know about?_";
	text1 = "_I have been trying to find them. I believe, for example, that I have discovered the location of the long lost Wand of Endless Magery. Perhaps I would tell its location to one who showed me he had true dedication._";

begintalknode;
	state = 8904;
	nextstate = 8905;
	question = "_And how would I show my true dedication?_";
	text1 = "He thinks. _Well, I think 2500 gold is the going rate for true dedication these days. Perhaps you would like to purchase the location of the wand?_";

begintalknode;
	state = 8905;
	nextstate = 8901;
	question = "_I want to know the location of this Wand of Endless Magery._ (Pay 2500 coins.)";
	text1 = "He gladly accepts your 'dedication.' _The Wand of Endless Magery is in the Tower of Zkal. That legendary tower, I have found, is at the southern end of the island south of the city of Gale. Gale is at the northeast end of Valorim. Have a nice trip._";
	text3 = "He looks at your money and shakes his head. _You clearly have insufficient dedication. Perhaps you could accumulate more?_";
	text5 = "_You have already paid me. Go to the Tower of Zkal. That legendary tower, I have found, is at the southern end of the island south of the city of Gale. Gale is at the northeast end of Valorim. Have a nice trip.";
	code =
		clear_strings();
		if (gf(0,28) > 0)
			add_string(5);
			else {
				if (coins_amount() >= 2500) {
					add_string(1);
					change_coins(-2500);
					sf(0,28,1);
					run_game_hardcode(3);
					}
					else add_string(3);
				}
	break;

begintalknode;
	state = 8905;
	nextstate = -1;
	question = "_That is far too much money!_";
	text1 = "_Who can put a price on knowledge?_ He pauses. _Come to think of it, I can. And if you can't meet my price, I will not help you. Good day._";
	action = END_TALK;

begintalknode;
	state = 8906;
	nextstate = -1;
	condition = gf(308,7) >= 1;
	question = "_Actually, I have found the true enemy. It is the vahnatai._";
	text1 = "He looks surprised. _Oh. Well. I guess we know who at least one of the true enemies is. But perhaps not the truest enemy._ Whatever that means.";

begintalknode;
	state = 8901;
	nextstate = 8908;
	question = "_Do you provide instruction in the magical arts?_";
	text1 = "He looks somewhat insulted. _You take me for some mere academic?_";

begintalknode;
	state = 8908;
	nextstate = -1;
	question = "_So you don't teach?_";
	text1 = "_A wizard's secrets are rare and powerful, a much-needed edge over competitors and enemies. Those who share them for mere coin are fools. You should go to Shayder. I hear such fools live there._";


// Meena

begintalknode;
	tag = 9080;
	state = -1;
	nextstate = 9057;
	question = "Meena";
	text1 = "You meet a woman with dark skin, long black hair, and an infectious grin. She wears an Anama ring and healer's robes.";
	text2 = "_I am Meena, of the Anama church. Greetings to you! You look like a traveler._";
	text5 = "_What else would you like to know? Does anything ail you?_";
	action = INTRO;

begintalknode;
	state = 9057;
	nextstate = 9058;
	question = "_Are you a healer?_";
	text1 = "_Yes, a traveling healer. It's tiring work, but there is too much to do for me to stop._";

begintalknode;
	state = 9058;
	nextstate = 9059;
	question = "_Where have you traveled?_";
	text1 = "_I move from town to town on the Isle of Bigail as people sicken. The worst was Hectar. Terrible mess._";

begintalknode;
	state = 9058;
	nextstate = -1;
	question = "_You should rest. Otherwise, you'll get sick as well._";
	text1 = "_I can't. I heal one person, and two more grow sick. I heal two, and four become ill._ She smiles sadly. _It's frustrating work, but I do save lives. Seeing one child who would not live but for me fills me with all the energy I need._";
	text3 = "_What can I say? The roaches are gone, but the diseases still remain. It'll be a long time before this island recovers. That much is certain._";
	action = DEP_ON_SDF 307 5 0;

begintalknode;
	state = 9059;
	nextstate = 9060;
	question = "_What happened in Hectar?_";
	text1 = "_It is terrible. I don't know why, but that town has been hit by more disease than just about anyone. Terrible mess._";
	text3 = "_It is terrible. Hectar was hit by more disease than just about anyone. Now we know why. I hear that the roaches were all being bred near there._";
	action = DEP_ON_SDF 307 5 0;

begintalknode;
	state = 9060;
	nextstate = -1;
	condition = gf(307,5) == 0;
	question = "_Any guess why?_";
	text1 = "_None. No idea at all._";

begintalknode;
	state = 9057;
	nextstate = -1;
	condition = gf(4,14) >= 2;
	question = "_Jed told us that you can teach me tricks for traveling. Can you?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Meena's Training","In her years as a traveling healer, Meena has learned many things about traveling safely through harsh terrain. If you pay her a little for her time, she will share her knowledge with you.",53,0,3);
	break;

// Judith 9100

begintalknode;
	tag = 9100;
	state = -1;
	nextstate = 9185;
	question = "Judith";
	text1 = "This woman wears the ankh of a healer, but she has a strangely cold, businesslike demeanor. _I'm Judith, of the Church of the Divine Lucre._";
	text5 = "Judith says, _The Church of the Divine Lucre remains at your service. For a minor fee, of course._";
	action = INTRO;

begintalknode;
	state = 9185;
	nextstate = 9186;
	question = "_What services does the Church of the Divine Lucre offer?_";
	text1 = "_I am a healer of the Church of the Divine Lucre. I have healing magic available, for very reasonable rates._";

begintalknode;
	state = 9185;
	nextstate = -1;
	question = "_This is a real church?_";
	text1 = "_Of the Divine Lucre, yes._";

begintalknode;
	state = 9185;
	nextstate = 9187;
	question = "_What does the Church of the Divine Lucre believe in?_";
	text1 = "_What can I say? We believe that the best route to a better life and happier soul is through improvement, and the best improvement comes through enlightened self-interest. It is a faith that demands much, but has great rewards._";
	text3 = "_I'm sure an Anama member such as yourself would not understand, but I will try. We believe that the best route to a better life and happier soul is through improvement, and the best improvement comes through enlightened self-interest._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 9185;
	nextstate = -1;
	question = "_What can you sell me?_";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Judith the Healer",
		  "Judith sells healing items, and, in these troubled times, she charges all that the market will bear.",
		  60,5,0);	
	break;

begintalknode;
	state = 9186;
	nextstate = -1;
	question = "_What do you consider reasonable rates?_";
	text1 = "She looks irked. _The Anama have caused a horrible healing glut in this area. It's almost impossible to make any money!_ She shrugs. _Still, with demand so high, I'm doing all right._";

begintalknode;
	state = 9185;
	nextstate = 9188;
	condition = gf(6,11) >= 1;
	question = "_I have heard you might know about a certain ancient artifact._";
	text1 = "She looks annoyed that you've heard of her knowledge, but decides to make the best of it. _It's true. I have stumbled upon the location of the lost Fury Bow, an intensely powerful artifact._";
	text2 = "_I will divulge its location, for a mere thousand coins._";

begintalknode;
	state = 9188;
	nextstate = 9185;
	question = "_Ok, here is your money. Now tell us where it is._ Pay 1000 coins.";
	text1 = "She says, _Well, I have on good authority that the Fury Bow is in the legendary Pit of the Wyrm, far to the northeast. It's due east of a village called Bremerton._ (You take note of this.)";
	text3 = "She looks annoyed when she realizes that you don't have the money. _It's a thousand gold, you know. No less._";
	text5 = "_You already know where to go. I'm not cruel enough to charge you twice. It's due east of a village called Bremerton._";
	code =
		clear_strings();
		if (gf(129,12) > 0)
			add_string(5);
			else {
				if (coins_amount() >= 1000) {
					add_string(1);
					change_coins(-1000);
					sf(129,12,1);
					run_game_hardcode(7);
					}
					else add_string(3);
				}
	break;

begintalknode;
	state = 9187;
	nextstate = -1;
	question = "_Rewards such as?_";
	text1 = "_Focus. Strength. Money. No guilt. Power. You know? What everyone wants._ She grins.";

begintalknode;
	state = 9188;
	nextstate = -1;
	question = "_I don't want to pay that much._";
	text1 = "The idea that you wouldn't want to give her money is clearly bothersome to her. _Fine. Come back when there is something you are willing to purchase from me. Time is valuable._";
	action = END_TALK;
	
// Oriathon 9200

begintalknode;
	tag = 9200;
	state = -1;
	nextstate = 9201;
	question = "Oriathon";
	text1 = "You meet a priest of the Anama. Despite the turmoil on the isle, he remains calm and quiet. He shakes your hand in greeting, and says simply, _I am Oriathon. I care for the needs of those here, and I tend to those in the barracks._";
	text5 = "Oriathon continues to be very calm and reserved. You notice, however, that he is starting to look pale. You hope that he isn't falling ill.";
	action = INTRO;

begintalknode;
	state = 9201;
	nextstate = 9202;
	question = "_What is your job here?_";
	text1 = "He touches his priest's robes without comment.";

begintalknode;
	state = 9202;
	nextstate = 9203;
	question = "_Are you a priest of the Anama?_";
	text1 = "He says, tersely, _I follow my Anama beliefs. It is a struggle._";
	text3 = "He holds up a hand and shows you his Anama ring. It's identical to the ring you wear.";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 9203;
	nextstate = 9204;
	question = "_Tell me about your beliefs._";
	text1 = "_We Anama attempt to resist the temptation of magic, of the powers it gives, of the aid in defense._ He frowns. _At times I wish the Anama allowed magic. But this is my weakness._";

begintalknode;
	state = 9203;
	nextstate = -1;
	question = "_What struggles have you faced?_";
	text1 = "He looks very concerned. _Roaches attack constantly. Disease is everywhere. I lead as best I can._";
	text3 = "He looks very sad and alone. _Hectar fell to the disease. I left the site of my failure,_ is all he says.";
	code =
		if (which_town() ==130)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 9204;
	nextstate = 9201;
	question = "_Perhaps magic could help stop the roach plague._";
	text1 = "_We will persevere without the dark arts. I am sure of it._";
	text3 = "_Do not lose your faith, fellow follower. We will persevere without the dark arts. I am sure of it._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 9204;
	nextstate = 9201;
	question = "_I am sure that you will be able to resist the plague without magic._";
	text1 = "_I am sure that you are right though, at times, I am weak. You should consider joining the Anama, if that is how you feel._";
	text3 = "_You are right, of course. Thank you for your supportive words._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 9201;
	nextstate = -1;
	condition = has_spec_item(40) == 0;
	question = "_I want to join the Anama._";
	text1 = "_I am glad. There are many priests on this island who can teach you. I can't. This place is too sick. We are too tired. I am sorry._";

begintalknode;
	state = 9201;
	nextstate = 9205;
	question = "_Everyone here lives in barracks?_";
	text1 = "_Yes. For now. We are poor, and very little land has been cleared._";

begintalknode;
	state = 9205;
	nextstate = -1;
	question = "_So you will not be in barracks forever?_";
	text1 = "_That is the hope. In the end, it will fall to Ahonar, the leader of the Anama, to decide._";
	
		
// Sandra

begintalknode;
	tag = 9300;
	state = -1;
	nextstate = 9385;
	question = "Sandra";
	text1 = "This woman has a light dusting of makeup on her face, there to make her skin darker. You, however, immediately recognize her as an Avernite. Your unexpected arrival startles her.";
	text2 = "She pulls you aside to speak in private. _I'm Sandra. Unspecified Services. Pleased to meet you._";
	text5 = "Sandra constantly looks around when speaking with you, to make sure that nobody overhears the conversation. _What else, fellow infiltrator?_";
	action = INTRO;

begintalknode;
	state = 9385;
	nextstate = 9386;
	question = "_What are you doing here?_";
	text1 = "_I'm from Unspecified Services, like you. Keeping an eye on what's going on in Sharimik. Heard about your accomplishments. Excellent work._";

begintalknode;
	state = 9386;
	nextstate = 9389;
	condition = gf(12,11) == 0;
	question = "_Thank you. I try._";
	text1 = "_You're really going places. Been to the Bunker yet?_";

begintalknode;
	state = 9389;
	nextstate = 9390;
	question = "_The Bunker?_";
	text1 = "_It's back down in New Cotra. A few mages, trying to figure out outlandish solutions to our problems. They might be able to help you. Talk to Captain Johnson. He'll tell you how to enter._";
	action = SET_SDF 12 11 1;
	code =
		toggle_quest(102,10);
		toggle_quest(107,1);
	break;
	
begintalknode;
	state = 9390;
	nextstate = -1;
	question = "_Where is Captain Johnson?_";
	text1 = "_Captain Johnson is back in Fort Emergence. Bitter old guy. Hates Unspecified Services. You may have to press him to get information about the Bunker. Ask him about it, and mention my name to him if he gives you trouble._";


begintalknode;
	state = 9386;
	nextstate = 9387;
	question = "_Tell me more about Unspecified Services._";
	text1 = "_I can't say much Anaximander hasn't already told you. We're the only branch of the Avernum government doing anything up here right now. I'm moving between Sharimik and Lorelei, looking things over._";

begintalknode;
	state = 9387;
	nextstate = 9388;
	question = "_What's it like living here?_";
	text1 = "_Beats going up north. Gale is being attacked by these utterly lethal golems, and the Keep of Tinraya was utterly destroyed._";

begintalknode;
	state = 9388;
	nextstate = 9392;
	question = "_What happened to the Keep of Tinraya?_";
	text1 = "_It was the strongest fort in Valorim, and some sort of bizarre monster unlike anything ever seen wiped it out. Can't find anything else about it, but I'm working on it._";
	text2 = "_That reminds me. If you haven't gotten a map of Karnold Province yet, you should._";

begintalknode;
	state = 9392;
	nextstate = -1;
	question = "_How?_";
	text1 = "_Find Levin. He sells them. He knows there are Avernites around, but he doesn't care. He's a cunning one. He thinks he can use us. He's probably right._";
	
begintalknode;
	state = 9385;
	nextstate = -1;
	question = "_Do people realize that Avernites walk among them?_";
	text1 = "_Of course. Well, some know for sure. And others have heard rumors._ She smiles. _We're lucky, though. The Empire has quarantined Valorim. They aren't helping the settlements here._";
	text2 = "_The Empire won't help, and we might. So they'll at least hear what we have to say._";

begintalknode;
	state = 9385;
	nextstate = 9391;
	condition = gf(10,0) >= 1 && gf(10,0) <= 2;
	question = "_Mayor Knight wants me to do a mission for him. Any idea why?_";
	text1 = "_Because he believes that it's a suicide mission. He thinks Vothkaro, king of troglodytes, will kill anyone he sends. He'd rather you die than one of his men._";

begintalknode;
	state = 9391;
	nextstate = -1;
	question = "_What do you think I should do?_";
	text1 = "She shrugs. _Go visit the troglodytes, of course. They might make valuable allies._";

// Najib

begintalknode;
	tag = 9400;
	state = -1;
	nextstate = 9457;
	question = "Najib";
	text1 = "This man wears the sash and insignia of a mayor, leader of one of the villages or cities of the Empire. He is sitting here drinking ale. Lots of it. _I am known as Najib. That's Mayor Najib._ He belches.";
	text5 = "Mayor Najib continues to sit and drink ale. Lots of it.";
	action = INTRO;

begintalknode;
	state = 9457;
	nextstate = 9458;
	question = "_Working hard, Mayor?_";
	text1 = "He laughs. _Sure I am. I'm planning strategy! What do you think I'm doing?_ He takes a long swig of ale.";

begintalknode;
	state = 9458;
	nextstate = 9459;
	question = "_Strategy for what?_";
	text1 = "_Planning how to hold off endless troglos with almost no troops and no reinforcements. How to do anything when the Empire has quarantined the area. Our glorious leaders in Sharimik have been no help either._";
	text3 = "_Now that the trogs destroyed Aminro and put me out of a job, and the Empire is nowhere to be seen since they quarantined the area, I'm trying to figure out how to deal with the madmen in Sharimik._";
	code =
		if (which_town() ==146)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 9459;
	nextstate = -1;
	question = "_What do you know of the troglos?_";
	text1 = "_They breed like bunnies, and they're smart and fierce and ruthless. Like nothing we've ever fought before!_ He drinks more.";
	text3 = "_The troglos are still out there. They're fighting the giants. But they'll be back!_";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 9459;
	nextstate = -1;
	question = "_What's going on in Sharimik?_";
	text1 = "He finishes his beer and calls for two more. _Mayor Knight's turning Sharimik into his own little fiefdom, and he has the support to do it. Nobody gets anything without licking his boots. And the troglos keep killing._";
	text2 = "He drinks more. _And people wonder why I spend my time drunk._";

begintalknode;
	state = 9459;
	nextstate = 9460;
	question = "_Why has the Empire quarantined this area?_";
	text1 = "_Bet you hadn't heard about that! The Keep of Tinraya's been destroyed by monsters! Totally. The Empire has shut us all off to die, to keep the monsters from spreading._ He takes a long swig of ale. ";
	text2 = "_And that's why I drink._";

begintalknode;
	state = 9460;
	nextstate = -1;
	question = "_Does anyone know what happened to the Keep of Tinraya?_";
	text1 = "_Not exactly. Some weird sort of monster up north. The biggest, strongest city in Valorim is now just a smoking hole. Sobering, eh?_";

begintalknode;
	state = 9460;
	nextstate = -1;
	question = "_All of Valorim is closed off?_";
	text1 = "_Yes. Blackcrag Fortress, north of here, was the main pass between Valorim and the rest of the Empire. It's been sealed. None of us are allowed in to see Empress Prazac._";

begintalknode;
	state = 9457;
	nextstate = 9461;
	question = "_What's it like being a mayor?_";
	text1 = "_Aminro is nothing but a big mess. A big, constant mess, being blasted into nothing, one brick at a time._";
	text3 = "_Well, I'm not a mayor anymore. I'm from Aminro. It's been smashed to bits by the troglos._";
	code =
		if (which_town() ==146)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 9461;
	nextstate = -1;
	condition = gf(146,11) <= 1;
	question = "_Is there anything I can do to help?_";
	text1 = "He laughs bitterly. _You know who should be asking that? The Empire! They should! But since you asked..._ He removes a ring from his finger and shows it to you. _This is valuable._";
	text2 = "_King Vothkaro is the leader of the troglos. If you kill him, if you avenge my men and my town, this ring is yours._ He clearly doesn't think that you will ever collect on the offer.";
	action = SET_SDF 146 11 1;
	code =
		toggle_quest(58,1);
	break;
	
begintalknode;
	state = 9457;
	nextstate = -1;
	condition = gf(146,11) == 1 && gf(28,13) >= 1;
	question = "_Well, I did it. I killed King Vothkaro._";
	code =
		run_hardcode(182);
	break;
	
begintalknode;
	state = 9457;
	nextstate = -1;
	condition = gf(146,11) == 1 && gf(28,13) == 0 && gf(28,8) >= 7;
	question = "_I am not going to kill Vothkaro. Things are complicated._ Tell the tale.";
	text1 = "You try to explain what happened in Castle Troglo. He barely listens. He only drinks more and grows gradually angrier.";
	text2 = "Then he waves you away. _Go. I knew you'd never help us. I want nothing to do with you._";
	code =
		toggle_quest(58,10);
		sf(146,11,2);
	break;
	
begintalknode;
	state = 9457;
	nextstate = -1;
	condition = gf(146,11) == 1 && gf(28,13) == 0;
	question = "_No progress to report on the whole 'Kill Vothkaro' thing._";
	text1 = "_Of course not. You're heroes to the southerners, but nobody can help us._ He returns to his drinking.";
	action = END_TALK;	
	
	
	
// Shahpur

begintalknode;
	tag = 9500;
	state = -1;
	nextstate = 9585;
	question = "Shahpur";
	text1 = "You meet a haggard woman with long, dark hair. She wears the robes of a priest over her armor. The cloth and the breastplate both show the scars of recent combat.";
	text2 = "She nods to you cordially, one warrior to another. _I am Empire War Priestess Shahpur._";
	text5 = "Priestess Shahpur faces you. Though she has dedicated her life to serving the Empire, she is surprisingly courteous to you.";
	action = INTRO;

begintalknode;
	state = 9585;
	nextstate = 9586;
	question = "_Looks like you've seen quite a bit of combat._";
	text1 = "She pats a massive mace hanging at her belt. _I help in the constant battle against the troglos. 'Tis a chore, but I have my faith to preserve me._";

begintalknode;
	state = 9586;
	nextstate = -1;
	question = "_What do you think of the troglodytes?_";
	text1 = "_They're vicious and endless foes, but I'm preserved by my prayers._";
	text3 = "_They're vicious and endless foes. Their numbers have decreased of late, but they still keep coming. My prayers preserve me._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 9586;
	nextstate = 9587;
	question = "_Which faith do you follow?_";
	text1 = "_I am one of the Anama. I sustain myself through holy power, without using the dark works of magic. I have advice to give you, if you will accept it._";
	text3 = "_I am one of the Anama. I see, from your ring, that you are too. I am glad to see one of my kinfolk so far from the Isle of Bigail! I have advice to give you, if you will accept it._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 9587;
	nextstate = -1;
	question = "_We will gladly accept your advice._";
	text1 = "_I've heard Mayor Knight of Sharimik was looking for some natural-born victims to go on a quest to the castle of the troglos. He's trying to become a bit of a local despot, but the mission may be of interest to you._";
	text3 = "_Now that you have done what Mayor Knight wished, you should leave. He is very unstable. You should go elsewhere. He can be scheming and dangerous. I have seen it._";
	action = DEP_ON_SDF 10 0 2;

begintalknode;
	state = 9585;
	nextstate = 9588;
	question = "_An Empire War Priestess?_";
	text1 = "_I follow the beliefs of the Anama. Our leader, Ahonar, bid me to lend my arm and wits to serve the Empire, to show my faith is of no threat to them. So I follow the Empress._";
	text2 = "_They have quarantined Valorim, and they don't hear our cries, but I help them still. I am loyal._";

begintalknode;
	state = 9588;
	nextstate = 9589;
	condition = gf(8,17) <= 1;
	question = "_What do you know about the Empress?_";
	text1 = "_Empress Prazac is the daughter of Hawthorne, who the Avernites so foully assassinated. She is wise and strong. I hope the Empire returns to us, so I may serve her better._";
	text2 = "_I wish I knew what she was like. I wish I could meet someone who had met her._";
	action = SET_SDF 8 17 1;
	code =
		toggle_quest(54,1);
	break;

begintalknode;
	state = 9589;
	nextstate = -1;
	question = "_Do you know where she lives?_";
	text1 = "_Last rumor I heard, she was in Blackcrag Fortress. It's at the north end of Valorim. It's impossible to get into, though. Completely sealed._";
	
begintalknode;
	state = 9585;
	nextstate = -1;
	question = "_Can you teach me priestly rituals?_";
	text1 = "_No! I am a warrior, not a teacher!_";

begintalknode;
	state = 9585;
	nextstate = -1;
	question = "_Can you heal us?_";
	text1 = "_What? Me? A war priestess? A mere chirurgeon and leech-monger? Bah! Leave me!_";
	action = END_TALK;

begintalknode;
	state = 9585;
	nextstate = -1;
	condition = gf(8,17) == 1 && gf(34,18) >= 1;
	question = "_I met Empress Prazac. She is alive, well, and in Blackcrag Fortress._ Describe the meeting.";
	code =
		run_hardcode(183);
	break;


// Kelly

begintalknode;
	tag = 9600;
	state = -1;
	nextstate = 9613;
	question = "Kelly";
	text1 = "You meet a young girl, tall for her age. She's running down the street bouncing a ball. She stops to watch you. _I'm Kelly. Hi!_";
	text5 = "Kelly continues to bounce her ball. She's quite nimble. _What else do you want?_";
	action = INTRO;

begintalknode;
	state = 9613;
	nextstate = 9614;
	question = "_Hi there._";
	text1 = "_You're an adventurer, right?_";

begintalknode;
	state = 9614;
	nextstate = 9615;
	question = "_Correct. I am an adventurer._";
	text1 = "She jumps up and down. _Wow! I've never met real adventurers before! I wish I was one! I could look after my daddy._";

begintalknode;
	state = 9615;
	nextstate = 9616;
	question = "_Why are you worried about your father?_";
	text1 = "_He's the missile guy! He's real worried about all the troglos, and might send me away. I hope he doesn't. I'd miss him._ She thinks. _Catch!_";
	text3 = "She looks sad. _Daddy sells missiles back in Sharimik. He sent me here to keep me safe from the mean troglos._ She thinks. _Catch!_";
	code =
		if (day_reached(95,2))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 9616;
	nextstate = -1;
	question = "Catch the ball.";
	text1 = "She throws her ball at you. You barely manage to catch it. Then you throw it back. _Good catch!_ After a little while, you move on.";
	action = END_TALK;

// Masok

begintalknode;
	tag = 9700;
	state = -1;
	nextstate = 9785;
	question = "Masok";
	text1 = "You meet a grim, squat halberdier of the Empire army. He is completely uninterested in speaking with you. _I am Masok. What do you want?_ The words come out as a low, resentful grunt.";
	text5 = "Masok doesn't want to talk to you any more than he did before. Some sense of duty or politeness, however, keeps him from just walking away. _What?_ he grunts.";
	action = INTRO;

begintalknode;
	state = 9785;
	nextstate = 9786;
	question = "_What sort of work are you engaged in currently?_";
	text1 = "_I'm a soldier._";

begintalknode;
	state = 9786;
	nextstate = -1;
	question = "_A noble profession._";
	text1 = "_Yeah. And that's all._ He turns away. What an uninteresting conversation.";
	action = END_TALK;

begintalknode;
	state = 9785;
	nextstate = 9787;
	condition = gf(147,9) <= 0 && gf(147,11) >= 1;
	question = "_I hear that you know where I can find a certain halberd._";
	text1 = "He looks angry that you know, and then confused, and then he thinks it over. His voice is quiet. _Look. There's this thing called the Black Halberd. It's sort of a legend. The best halberd ever made. Nobody really believes in it._";
	text2 = "_I sure didn't. Until I found a scroll._";

begintalknode;
	state = 9787;
	nextstate = 9788;
	condition = gf(147,9) <= 0;
	question = "_Where did you find this scroll?_";
	text1 = "_I found it in a stump. No kidding. It's old, and it's supposed to give directions to where the halberd is. Don't believe it's real? No difference to me. I can get it myself._";
	text2 = "_But if you want to purchase it from me, that'd be good too. Only 2000 coins._";

begintalknode;
	state = 9788;
	nextstate = 9785;
	question = "_A bargain at any price._ Give him 2000 coins.";
	code =
		run_hardcode(149);
	break;

begintalknode;
	state = 9788;
	nextstate = -1;
	condition = gf(147,9) == 0;
	question = "_I can't pay that much._";
	text1 = "He turns on his heel and walks away without a word.";
	action = END_TALK;

begintalknode;
	state = 9788;
	nextstate = -1;
	condition = gf(147,9) == 0;
	question = "_Give me the map or I will kill you._";
	text1 = "You can't threaten a soldier of the Empire that way without expecting a certain sort of response.";
	action = END_TALK;
	code =
		sf(133,10,1);
		make_zone_hostile();
	break;

begintalknode;
	state = 9785;
	nextstate = -1;
	condition = gf(147,9) > 0;
	question = "_I'd like to know more about the Black Halberd._";
	text1 = "_You already know all I do. You have the map. Now go to Calloc, far to the northwest. Or just sell the map and forget about it. I don't care._";

// Kagan 9800


begintalknode;
	tag = 9800;
	state = -1;
	nextstate = 9801;
	question = "Kagan";
	text1 = "At first, this man looks like yet another Empire citizen, a harmless and hard-working farmer. Then he boldly walks up to you. He clearly wants to speak with you. _I am Kagan. I'm glad to meet you at last._ You notice that his skin is very pale.";
	text5 = "Kagan makes small talk with you, keeping an eye open for any guards who might get close. You notice that, despite his time out in the sun, he is extremely pale.";
	action = INTRO;

begintalknode;
	state = 9801;
	nextstate = 9802;
	question = "_You wish to speak with us?_";
	text1 = "He lowers his voice. _I know I don't look like it, but I'm an Avernite! Unspecified Services! I have information for you._";
	text2 = "He whispers, _Of course, as always. I'm always looking for more useful stuff on what's happening._";
	action = SET_SDF 150 11 1;

begintalknode;
	state = 9802;
	nextstate = -1;
	question = "_Why were you sent up here?_";
	text1 = "_I and one other were sent to do recon against the giants, to try to find out what created them. It didn't work out. That's why I have information for you._";
	text3 = "_I and one other were sent to do recon against the giants, to try to find out what created them. It didn't work out. That's why I have information for you. The giants aren't attacking anymore, but you might still find useful items in their lair._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 9802;
	nextstate = 9803;
	question = "_What's the information?_";
	text1 = "_A compatriot and I were trying to sneak into the giants' cavern. Unfortunately, our stealth spell didn't hold out._";

begintalknode;
	state = 9803;
	nextstate = 9804;
	question = "_What happened then?_";
	text1 = "_We got caught. My friend was slain. I escaped. But worst of all, we lost Smite._";

begintalknode;
	state = 9804;
	nextstate = 9805;
	condition = party_has_item(392) <= 0;
	question = "Smite?_";
	text1 = "Smite was a magical weapon, a pike which could slay giants! The giants took it. But maybe you could regain it!_";

begintalknode;
	state = 9805;
	nextstate = 9806;
	question = "_Where did you lose it?_";
	text1 = "_We lost the pike in the forge, a lava and blacksmith filled cavern near the giant's caves. If you wish to fight the giants, that pike would be a huge help._";

begintalknode;
	state = 9806;
	nextstate = -1;
	question = "_Well, you are also a huge help to me._";
	text1 = "He grins. _Now, if you'll excuse me, I got a bit of spying to do._";
	text2 = "He thinks. _Oh, by the way. There are two others of our number who spend time in Lorelei. One spends all his time there, one other is there sometimes. Just forget their names._ Then he leaves.";
	action = END_TALK;

begintalknode;
	state = 9804;
	nextstate = -1;
	condition = party_has_item(392) > 0;
	question = "_I found it._ (Show it to him.)";
	text1 = "_Wonderful. I am glad you have it. I am sure you can do a better job with it than we did._";

begintalknode;
	state = 9801;
	nextstate = -1;
	question = "_You are looking very pale._";
	text1 = "_Not as bad as I did. I should be able to pass as a surface dweller soon._";


// Daltrey 9900


begintalknode;
	tag = 9900;
	state = -1;
	nextstate = 9901;
	question = "Daltrey";
	text1 = "You meet an Empire soldier. Although he he still wears his chain mail, he clearly has not swung a sword for years. He is small, old, and twisted, with pale, chalky skin and a cold gaze. _I am Commander Daltrey._";
	text5 = "Commander Daltrey looks old and tired. You notice that his chain mail has lots of small, rusty patches.";
	action = INTRO;

begintalknode;
	state = 9901;
	nextstate = 9902;
	condition = gf(152,11) == 0;
	question = "_Greetings, Commander._";
	text1 = "He smiles thinly. _Greetings. You have arrived. Welcome to our beleaguered village. I wish to speak with you, Avernite._";
	action = SET_SDF 152 11 1;

begintalknode;
	state = 9901;
	nextstate = 9903;
	condition = gf(152,11) >= 1;
	question = "_How did you know that I am an Avernite?_";
	text1 = "_I was privileged to practice my craft on many of your people during the Avernum War._";

begintalknode;
	state = 9903;
	nextstate = 9904;
	question = "_What craft was that?_";
	text1 = "His face twitches slightly. _I am an interrogator._";

begintalknode;
	state = 9904;
	nextstate = 9905;
	question = "_Sounds like an unpleasant line of work._";
	text1 = "_I get answers from prisoners. By whatever means are necessary._";

begintalknode;
	state = 9905;
	nextstate = 9906;
	question = "_Sounds nasty._";
	text1 = "_What's past is past. What I wish to tell you is what I determined from a giant who became my prisoner, information you can use, if you fight the giants like you fought other foes. Do you wish to learn?_";
	text3 = "_Nasty, but necessary. Until the giants stopped attacking us, the information I obtained saved numerous lives._";
	action = DEP_ON_SDF 307 8 0;

begintalknode;
	state = 9906;
	nextstate = 9907;
	condition = gf(307,8) == 0;
	question = "_I don't approve of your methods, but I'll listen._";
	text1 = "He chuckles dryly. _The giant held up well under his torments, but twice the size, twice the nerves. He told me that the giants have four tribes, and a huge temple in addition._";

begintalknode;
	state = 9907;
	nextstate = 9910;
	question = "_What do you know of the four tribes?_";
	text1 = "_The four tribes live in the upper level of their huge network of caverns. They seem to be having some sort of religious argument._";

begintalknode;
	state = 9907;
	nextstate = 9908;
	question = "_Where is this huge giant temple?_";
	text1 = "_The temple is in the lower part of their huge network of caverns. The hill giant said the temple has a guarded room filled with booty._";

begintalknode;
	state = 9908;
	nextstate = 9909;
	question = "_What sort of booty?_";
	text1 = "_Don't you think this information might be worth a little change? A fifty coin donation, perhaps?_";

begintalknode;
	state = 9909;
	nextstate = 9901;
	condition = coins_amount() >= 50;
	question = "_Since I don't have a choice, here you go._ (Pay 50 coins.)";
	text1 = "_They have a room in which they store items taken from their foes, in the lower level east of their great temple. It has a magical lock. There are important things inside. That is what the giant said. What value you can get from that is your business._";
	code =
		change_coins(-50);
	break;

begintalknode;
	state = 9909;
	nextstate = 9901;
	question = "_I do not want information gained by those means._";
	text1 = "_Then I don't want to talk._";

begintalknode;
	state = 9910;
	nextstate = 9907;
	question = "_Argument over what?_";
	text1 = "_Some giants have this odd cult. They worship bugs from far below the world. Some want to keep the old ways. Collect Blood Debt, whatever that is. But who cares?_";

begintalknode;
	state = 9901;
	nextstate = -1;
	condition = gf(152,11) >= 1 && gf(152,12) <= 1;
	question = "_Can I do anything to make life easier for your village?_";
	text1 = "_There is a job which requires intelligence, which I have, and a strong force, which I do not. There is a force of giant spies or infiltrators hiding close to Poulsbo. They're close. I don't know how close._";
	text2 = "_Find and kill them. I will reward you._";
	action = SET_SDF 152 12 1;
	code = 
		toggle_quest(72,1);
	break;
	
begintalknode;
	state = 9901;
	nextstate = -1;
	condition = gf(152,12) == 1 && gf(152,17) > 0;
	question = "_I found some bugs hiding in a crawlspace in the city walls._";
	text1 = "_Oh. That's nice, I guess. But there are still giants hiding out there._";

begintalknode;
	state = 9901;
	nextstate = -1;
	condition = gf(152,12) == 1 && gf(152,13) > 0;
	question = "_There were giant warriors hiding in a pit outside the city walls. They are dead._";
	code =
		run_hardcode(40);
	break;

begintalknode;
	state = 9901;
	nextstate = 9911;
	condition = gf(152,11) >= 1;
	question = "_What do you think of the possibility of the Avernites returning to the surface?_";
	text1 = "He thinks about this. _The odds are better than you might think._";

begintalknode;
	state = 9911;
	nextstate = 9912;
	question = "_What do you mean?_";
	text1 = "_Empress Prazac is better inclined towards your kind than others, like me, would want her to be. If her views don't get her assassinated, you might find her willing to turn a friendly ear to you._";

begintalknode;
	state = 9912;
	nextstate = -1;
	question = "_Where is she?_";
	text1 = "_I've heard tell that she is in Blackcrag Fortress, at the north end of Valorim. From there, she is trying to find a way to stop the monster plagues._";
	text2 = "_Good luck getting to see her, though. The fortress is sealed, cutting Valorim off from the rest of the Empire._";

// Kirchner

begintalknode;
	tag = 10000;
	state = -1;
	nextstate = 10029;
	question = "Kirchner";
	text1 = "This man has a kind and weary face. He wears priest's robes, an ankh hangs from his neck, and he carries a well-worn walking staff. _Greetings, warrior. I am Kirchner._";
	text5 = "Kirchner leans heavily on his walking staff. He takes advantage of any chance for a short rest.";
	action = INTRO;

begintalknode;
	state = 10029;
	nextstate = 10030;
	question = "_What is you profession, traveler?_";
	text1 = "_I am a traveling healer. In these dark times, I'm afraid there's a great need for my services._";

begintalknode;
	state = 10030;
	nextstate = 10031;
	question = "_Where have your travels taken you?_";
	text1 = "_I wander Midori Province, healing those hurt by the giants as best I can. Earlier, I was up by Gale. Things are grim up there, I can tell you. And worse elsewhere._";

begintalknode;
	state = 10031;
	nextstate = -1;
	question = "_What's happening around Gale?_";
	text1 = "_They were being attacked constantly by golems. Magical statues who fling magical ice and flames, whirl vicious blades, and can take huge amount of punishment before being destroyed._";
	text2 = "_I would have stayed up there healing, but, well, I will be able to do very little good when I'm dead._";

begintalknode;
	state = 10031;
	nextstate = -1;
	question = "_Where is it worse?_";
	text1 = "He lowers his voice. _The guards don't like people discussing the topic. But Footracer Province is empty. The Keep of Tinraya was completely destroyed._";
	text2 = "_It's to the northwest, completely walled off. Nobody is let in. A lot of people wonder what's hidden in there._";
	
begintalknode;
	state = 10029;
	nextstate = -1;
	condition = 1;
	question = "_Can you heal me?_";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Kirchner",
		  "Since you are fighting the monster plagues, Kirchner will spare you some of his healing goods.",
		  95,5,0);	
	break;


begintalknode;
	state = 10029;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_All right. I will pray for you safety._";
	action = END_TALK;

// Foxfire DLG IN AUXDLG 10100


begintalknode;
	tag = 10100;
	state = -1;
	nextstate = 10101;
	question = "Foxfire";
	text1 = "There is a bard busking here. This wandering entertainer's act is unlike anything you've ever seen. She sings. She says some tolerable poetry. She creates colored, wraithlike magical lights and make them dance before you.";
	text2 = "You watch entranced, enjoying a rare moment of tranquility. After her act, she approaches and greets you. _I can recognize another wanderer of the roads when I meet one. I am called Foxfire._";
	text5 = "When you aren't chatting, Foxfire launches into her act for people in the square. You watch, hypnotized, as she summons balls of light from nothing, whirls them about her, and dismisses them again.";
	text2 = "When she is done pressuring the viewers for a few copper pieces, she returns to chat with you.";
	action = INTRO;

begintalknode;
	state = 10101;
	nextstate = 10102;
	question = "_Is this how you make a living?_";
	text1 = "_I make beauty. That is what I make. Money is much less important._";

begintalknode;
	state = 10102;
	nextstate = 10103;
	question = "_It is very beautiful._";
	text1 = "She waves a hand. Tiny motes of colored light fly and dance in a wondrous, intricate pattern. It's truly hypnotizing. Then her tiny show ends. She says, _My faith inspires me to bring people joy._";
	text2 = "_Alas, to bring people more joy requires food for me. May I have a few coins?_";

begintalknode;
	state = 10103;
	nextstate = 10101;
	question = "_I can't spare any money right now._";
	text1 = "She frowns. _If you say so._";

begintalknode;
	state = 10103;
	nextstate = 10101;
	condition = coins_amount() >= 5;
	question = "Give five coins.";
	text1 = "She thanks you, but she doesn't seem excited about making the lights dance again.";
	code =
		change_coins(-5);
	break;

begintalknode;
	state = 10103;
	nextstate = 10101;
	condition = coins_amount() >= 10;
	question = "Give ten coins.";
	text1 = "She thanks you sincerely, utters a prayer, and prepares to make the lights dance again.";
	code =
		change_coins(-10);
		sf(152,16,1);
	break;

begintalknode;
	state = 10101;
	nextstate = 10103;
	condition = gf(13,13) >= 1 && has_spec_item(17) <= 0 && gf(152,16) == 0;
	question = "_Lyle in Lorelei mentioned you might know where I can find a magic shield._";
	text1 = "_What was that? Sorry. I didn't hear. I was busy earning my living._ She waves a hand, making little sparks of light come out. Then she looks at you meaningfully.";

begintalknode;
	state = 10101;
	nextstate = 10104;
	condition = gf(13,13) >= 1 && has_spec_item(17) <= 0 && gf(152,16) > 0;
	question = "_Lyle in Lorelei mentioned you might know where I can find a magic shield._";
	text1 = "The lights stop dancing. She looks confused. Then she remembers. _Oh, yes! I did find out about that. Someone gave me a gift in thanks for my show._";

begintalknode;
	state = 10104;
	nextstate = 10105;
	question = "_What gift did you receive?_";
	text1 = "_The man said that he had a key to a cult which has much knowledge, including incredibly powerful and rare magical artifacts. I hung on to it. For 500 coins I can use to continue my act for a long time, I can give you the key._";
	text2 = "_Will you give me payment for it?";

begintalknode;
	state = 10105;
	nextstate = 10101;
	question = "Pay her 500 coins.";
	text1 = "She hands you a small silver key. _The man said the cult was on the southernmost of the Remote Isles, in far southeastern Valorim. He said the cultists were very odd. Good luck to you, and thank you!_";
	text3 = "You don't have the 500 coins.";
	text5 = "You already have this item.";
	code =
		clear_strings();
		if (has_spec_item(17) > 0)
			add_string(5);
			else {
				if (coins_amount() >= 500) {
					add_string(1);
					change_coins(-500);
					set_spec_item(17,1);
					}
					else add_string(3);
				}
	break;

begintalknode;
	state = 10101;
	nextstate = 10106;
	question = "_Have you heard any useful gossip in your travels?_";
	text1 = "_No. I do not like to talk about the war._";

begintalknode;
	state = 10106;
	nextstate = -1;
	question = "_Is that a healthy attitude?_";
	text1 = "_Perhaps not. But I must maintain my tranquility in order to maintain my art. It requires great concentration._";

begintalknode;
	state = 10105;
	nextstate = 10101;
	question = "_I don't need it._";
	text1 = "_All right. I will keep it safe._";

begintalknode;
	state = 10101;
	nextstate = -1;
	condition = has_spec_item(17) > 0;
	question = "_Where can I use the key you sold me?_";
	text1 = "_The cult it gives access to is on the most remote of the islands at the southeastern tip of Valorim._";


// Carlos

begintalknode;
	tag = 10200;
	state = -1;
	nextstate = 10257;
	question = "Carlos";
	text1 = "You meet a wizened, scholarly looking man with a bushy beard. He has bits of freshly ground herbs under his fingernails and green stains on his robes. _I am Carlos, sole remaining teacher of of the University of Valorim._";
	text5 = "_The University of Valorim welcomes you, traveler. What would you like to know?_";
	action = INTRO;

begintalknode;
	state = 10257;
	nextstate = -1;
	question = "_Is this all of the University?_";
	text1 = "He shakes his head angrily. _The University was in Lorelei. Then it was sacked by those foul hill giants. I had to flee to here to teach in safety._";
	text3 = "_This is the first University in all of Valorim. Small, I know, one classroom, few instructors. But it is a start!_";
	code =
		if (which_town() ==156)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 10257;
	nextstate = 10261;
	question = "_Can I enroll in your college?_";
	text1 = "_Normally, well, you might. But we cannot take full-time students right now. And until the carnage ends, we will not be able to._";
	text2 = "_One day, we will rise again. We will prove to the Empire that it is unwise to ignore Valorim._";

begintalknode;
	state = 10261;
	nextstate = -1;
	question = "_Why is your school ignored?_";
	text1 = "_The Empire fears and disdains the wildness of Valorim in turn. They do not feel anyone here can truly live the life of the mind. When this war ends, however, I promise that we will prove them wrong._";	

begintalknode;
	state = 10257;
	nextstate = 10258;
	question = "_Are you part of the faculty here?_";
	text1 = "_Yes, I am a teacher at the University of Valorim. And very proud of it, as well._";

begintalknode;
	state = 10258;
	nextstate = 10259;
	question = "_What do you teach here?_";
	text1 = "_I have lost my university, but I teach still. The other instructors are gone. But my knowledge of alchemy is still as sharp as ever._";
	text3 = "_We had instructors in history, literature, and other arts. Then the instructors fled. Now we, that is, I, only teach alchemy._";
	code =
		if (which_town() ==156)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 10258;
	nextstate = 10261;
	question = "_What makes you proud of this school?_";
	text1 = "_It is bombarded, nearly abandoned, has no students anymore, and is ignored by the Empire even during the best of times. However, it is also my home, a potentially great place, and I am proud of it._";

begintalknode;
	state = 10259;
	nextstate = -1;
	question = "_Where did the other instructors go?_";
	text1 = "_There were four. Then three of them fled because of the giants. I teach alchemy now. That's all we offer. But we will be a great school one day, I'm sure of it!_";

begintalknode;
	state = 10259;
	nextstate = -1;
	question = "_What sorts of alchemy do you teach?_";
	text1 = "_I am able to teach many valuable recipes, to increase the flow of a cow's udders or to soothe the suffering of scabies. But I am sure such mild concoctions are of no interest to travelers like yourselves._";
	text2 = "_On the other hand, for donations which will help me repair our poor school, I can make you potions of great value._";
	code =
		sf(12,22,1);
	break;
	
begintalknode;
	state = 10257;
	nextstate = 10263;
	condition = gf(12,22) > 0;
	question = "_I want you to make a potion for me._";
	text1 = "_I am pleased. I need the money to fund the restoration of my school._";
	text2 = "_I have a rare skill. I can make elixirs, the most powerful of potions. I use the basic herbs, of course, but also need graymold, mandrake root, or both for everything I make. Each potion will also require 50 coins._";
	
begintalknode;
	state = 10263;
	condition = num_of_item(289) > 0 && num_of_item(292) > 0 && coins_amount() >= 50;
	question = "_I would like a healing elixir._ (Give healing herb and graymold.)";
	text1 = "You give him the herbs and the money. He removes some alchemical equipment from his desk, walks to a nearby table, and chops and boils for an hour. Eventually, he returns with a ceramic flask. _Here is your elixir._";
	action = REUSABLE;
	code = 
		inc_flag(190,7,1);
		change_coins(-50);
		take_num_of_item(289,1);
		take_num_of_item(292,1);
		reward_give(226);
		play_sound(22);
	break;
	
begintalknode;
	state = 10263;
	condition = num_of_item(289) > 0 && num_of_item(292) > 0;
	question = "_I would like a curing elixir._ (Give healing herb and graymold.)";
	text1 = "You give him the herbs and the money. He removes some alchemical equipment from his desk, walks to a nearby table, and chops and boils for an hour. Eventually, he returns with a ceramic flask. _Here is your elixir._";
	action = REUSABLE;
	code = 
		inc_flag(190,7,1);
		change_coins(-50);
		take_num_of_item(289,1);
		take_num_of_item(292,1);
		reward_give(227);
		play_sound(22);
	break;
	
begintalknode;
	state = 10263;
	condition = num_of_item(289) > 0 && num_of_item(290) > 0 && num_of_item(291) > 0 && num_of_item(292) > 0;
	question = "_I would like an armor elixir._ (Give healing, spiritual, and energetic herbs and graymold.)";
	text1 = "You give him the herbs and the money. He removes some alchemical equipment from his desk, walks to a nearby table, and chops and boils for an hour. Eventually, he returns with a ceramic flask. _Here is your elixir._";
	action = REUSABLE;
	code = 
		inc_flag(190,7,1);
		change_coins(-50);
		take_num_of_item(289,1);
		take_num_of_item(290,1);
		take_num_of_item(290,1);
		take_num_of_item(292,1);
		reward_give(230);
		play_sound(22);
	break;
	
begintalknode;
	state = 10263;
	condition = num_of_item(290) > 0 && num_of_item(291) > 0 && num_of_item(293) > 0;
	question = "_I would like a speed elixir._ (Give spiritual and energetic herbs and mandrake root.)";
	text1 = "You give him the herbs and the money. He removes some alchemical equipment from his desk, walks to a nearby table, and chops and boils for an hour. Eventually, he returns with a ceramic flask. _Here is your elixir._";
	action = REUSABLE;
	code = 
		inc_flag(190,7,1);
		change_coins(-50);
		take_num_of_item(290,1);
		take_num_of_item(291,1);
		take_num_of_item(293,1);
		reward_give(228);
		play_sound(22);
	break;


begintalknode;
	state = 10263;
	nextstate = -1;
	question = "_I don't need any elixirs._";
	text1 = "_All right. Please come back if you ever want to support learning in Valorim._";
	action = END_TALK;

// Maertok

begintalknode;
	tag = 10300;
	state = -1;
	nextstate = 10301;
	question = "Maertok";
	text1 = "The aged, spry man wears wizard's robes. They are decorated not only with the usual runes or sigils but with the insignia of a commander in the Empire army.";
	text2 = "He appraises you when you approach and deems you worthy of his time. _I am Commander Maertok._";
	text5 = "Commander Maertok is constantly giving orders, telling his soldiers to investigate some area or prepare a trap along a path. If the fight against the golems is futile, nobody has bothered to tell him.";
	action = INTRO;

begintalknode;
	state = 10301;
	nextstate = 10302;
	question = "_May I speak with you?_";
	text1 = "_I know of you. You are an adventurer. Welcome to our troubled province._";

begintalknode;
	state = 10302;
	nextstate = 10303;
	question = "_How are things going?_";
	text1 = "_Monoroe Province is Hell on Earth now, but won't be that way forever. We have General Baziron to lead us._";
	text3 = "Monoroe Province was Hell on Earth, but the golems seem to be on the edge of defeat. We have General Baziron to thank for it._";
	action = DEP_ON_SDF 308 0 0;

begintalknode;
	state = 10303;
	nextstate = 10304;
	question = "_Tell me of General Baziron._";
	text1 = "_He leads us from Tevrono. He was the only leader who had the guts to ignore those twits in Gale and fight the monsters with his head as well as his blade._";
	text3 = "_He leads us from Tevrono. He was the only leader who had the guts to ignore those twits in Gale and fight the monsters with his head as well as his blade. We all owe him our lives, for engineering the defeat of the golems._";
	action = DEP_ON_SDF 308 0 0;

begintalknode;
	state = 10304;
	nextstate = 10305;
	question = "_What sort of tactics does he employ?_";
	text1 = "_You should go see him yourself to find out what I mean. He lives in Tevrono, to the northeast. I'll be departing for there soon myself._";
	text3 = "_His office is nearby. I came here from Greendale to fight for him. You should go speak with him yourself. You'll see what I mean._";
	code =
		if (which_town() == 162)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 10305;
	nextstate = -1;
	condition = day_reached(165,3) > 0;
	question = "_When will you depart Greendale?_";
	text1 = "_We'll be abandoning Greendale soon. The golems were coming here one or two at a time to attack, and we were picking them off easily. Now they're coming in bigger groups, so we're going to rejoin our army before we get cut off._";

begintalknode;
	state = 10303;
	nextstate = -1;
	condition = gf(308,0) >= 1;
	question = "_Actually, I helped a bit with that whole defeating the golems thing._";
	text1 = "_Did you? I know nothing of it. All I know is Baziron's brave and cunning leadership, which kept this province from being overrun before you got here._";
	text2 = "_If you're planning to go around taking credit for his work, don't do it here. You'll find yourself in trouble._";

begintalknode;
	state = 10301;
	nextstate = 10306;
	question = "_You are a wizard?_";
	text1 = "_I have some competence in that area. Valorim doesn't have enough of my kind. If the Empire had given us more resources, all the monsters might not have troubled us as much as they did._";
	text3 = "_Yes, I am. And don't trouble me with your Anama foolishness. I'll hear none of it. And you may anger me._";
	code =
		if (has_spec_item(40) == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 10306;
	nextstate = 10307;
	condition = has_spec_item(40) <= 0;
	question = "_Can you teach me any magic?_";
	text1 = "_No. I am not a teacher. I am a fighter, a war mage. If you want to learn, sneak into Gale and find Velnas._";

begintalknode;
	state = 10307;
	nextstate = -1;
	question = "_Why must I sneak into Gale?_";
	text1 = "_Because of the paranoia and foolishness of its leaders. Search the perimeter of the town. If you are attentive, you can find a way in._";

begintalknode;
	state = 10307;
	nextstate = -1;
	question = "_How can I sneak into Gale?_";
	text1 = "_I've heard that certain people hide just outside the city walls. Smugglers are necessary for the city to survive._";

// Zang

begintalknode;
	tag = 10480;
	state = -1;
	nextstate = 10458;
	question = "Zang";
	text1 = "There is a monk standing calmly in this room. He is a serene fellow, seemingly undisturbed by the way you broke into his house.";
	text2 = "_Welcome, pilgrim. You were lucky to find me. Have you come here to learn?_";
	text5 = "Zang is completely serene. _What else do you wish? How else will you be enlightened?_";
	action = INTRO;

begintalknode;
	state = 10458;
	nextstate = -1;
	question = "_Why did you say I was lucky to find you?_";
	text1 = "_I am a wandering spirit. I move like freedom, from home to home and town to town. I may not be here tomorrow. And yet, I may be more here than ever before._";

begintalknode;
	state = 10458;
	nextstate = -1;
	question = "_What do you do here?_";
	text1 = "_I am the teacher, the bringer of knowledge, but not the distributor of trivia. I am not important. Only my knowledge._";

begintalknode;
	state = 10458;
	nextstate = 10459;
	question = "_What do you teach?_";
	text1 = "_Secrets of meditation, of knowledge. I will free you and lead you to new realms of possibility. And I will do so for only three thousand coins._";

begintalknode;
	state = 10459;
	nextstate = -1;
	question = "_Three thousand? Why do you need to charge so much?_";
	text1 = "_The aid of money helps me to relieve myself from the cares of the material world. It also buys teaching supplies. And it is not to the teacher to challenge the student._";

begintalknode;
	state = 10459;
	nextstate = -1;
	question = "_I'm not interested._";
	text1 = "_Then move on, pilgrim. This shrine is not for such as you._";
	action = END_TALK;

begintalknode;
	state = 10459;
	nextstate = -1;
	condition = coins_amount() >= 3000;
	question = "_All right._ (Pay 3000 coins.)";
	action = END_TALK;
	code =
		run_hardcode(54);
	break;

begintalknode;
	state = 10458;
	nextstate = 10460;
	condition = gf(8,18) >= 1;
	question = "_I met someone named Starcap in Sharimik. He told us about you._";
	text1 = "Zang's tranquility immediately and completely disappears. _Oh? And what did that slobbering nit say about me?_ He looks extremely angry.";

begintalknode;
	state = 10460;
	nextstate = -1;
	question = "_Ummm... nothing. Never mind._";
	text1 = "_Fine. Then leave me be, so I may regain my center._";
	action = END_TALK;

begintalknode;
	state = 10460;
	nextstate = 10461;
	question = "_He said you are a thief. He sent me to find you._";
	text1 = "_Well, now you have found me. And his knowledge is mine, to do with as I choose. He is nothing. And so are you. Do you have anything to say about that?_";

begintalknode;
	state = 10461;
	nextstate = 10458;
	question = "_Can I just tell Starcap I stopped you? Then he will give me a reward._";
	text1 = "_You can tell him whatever you want. It would be dishonorable, but it is allowed. I wouldn't be able to stop you._";
	action = END_TALK;
	code =
		sf(173,12,1);
	break;
	
begintalknode;
	state = 10461;
	nextstate = -1;
	question = "_No, never mind. Sorry to trouble you._";
	text1 = "_All right, then. Your apology is accepted. I see there is no more peace and stillness for me here. Goodbye._ He walks quickly out of the room.";
	action = END_TALK;
	code =
		erase_char(17110);
		erase_char(17120);
	break;

begintalknode;
	state = 10461;
	nextstate = -1;
	question = "_You are a thief. You must pay now._";
	text1 = "_Fine, then. Bow before the mighty force of my superior knowledge!_";
	action = END_TALK;
	code =
		set_attitude(17110,10);
		set_attitude(17120,10);
	break;

